[Zope3-dev] Catalog, Multifieldindex, Resultsortig and batching!

Marcus J. Ertl marcus.ertl at larp-welt.de
Tue Aug 12 23:25:03 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I try now, to build a fieldindex, that stores it's entries in a
sql-database instead of btrees. (I have done some tests before, and it
seems, this improves performance, especial by sorting and batching on
large resultsets!)

But I have some questions now:

Wasn't there an multifield index, some time ago? Where is it no?
(Perhabs I can steale some code!)

What is a keyword index! (This may be a very silly question!)

What is a topic index! (This may be a very silly question too!)

Isn't there a way to do searches like (index1, value1) OR (index2,
value2) in catalogs?

And this is my main question: In index.py of the field index, I found::

    def query(self, querytext, start=0, count=None):
        """See interface IQuerying"""
        res = self.search(querytext)
        if start or count:
            res = res[start:start+count]
        return res

I see, this is a way to get back slices of the search result, but how
are they sorted? It may be create difference if I sort first, and slice
than, or slice first, and sort later! For example sometime I want the
10 newest objects, to show them, an other time, I want to get the 10
oldest, to remove them! So I have to sort them before slicing! Is there
a way to do this? Or have I to write my own adapter for this?

Bye
  Marcus



- -- 
"All animals are equal but some animals are more equal than others."
                                       -- George Orwell, Animal Farm

LARP-Welt - Das LARP-Portal im Internet: http://larp-welt.de

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.2

iQA/AwUBPzlNH+qadODfRL/EEQL9kQCg4e0D057MjJ3eHxvJfYWrBxxCTtsAn2xO
qVslF67Nqd65LYECKELU9jOA
=7VPB
-----END PGP SIGNATURE-----





More information about the Zope3-dev mailing list