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

Marcus J. Ertl marcus.ertl at larp-welt.de
Wed Aug 13 21:36:20 EDT 2003


Hello!

I'm afraid, this mail never got to the list, so I send it again. please
ignore it, if it is duplicated (or even better, write a answer ;o))!

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







More information about the Zope3-dev mailing list