Hi, Chris and other developers.
I adapted repoze.catalog field index sorting code and tests for
standard zope.index FieldIndex and looks like it works. :)
Though I like raising the KeyError when trying to sort docids that are
not indexed, I had to remove it from interface declaration, and change
it to skipping values as in ZCatalog/repoze.catalog. The problem is
that it's not trivial to efficiently implement that checking in some
cases. For example in FieldIndex sort method, in the use_lazy branch,
set intersections are used and I can't see a way to check if some of
docids are not indexed besides storing some additional variable which
I also adapted repoze.catalog's KeywordIndex fixes/optimizations to
zope.index KeywordIndex and TopicIndex.
There is now also a "nadako-sorting" branch of zope.app.catalog. It
adds sorting/limiting/reversing features to the "searchResults" method
of catalog. It also introduces KeywordIndex for catalog, because I
added support for IIndexSearch to zope.index KeywordIndex. :)
I request some review from developers and if there won't be any
objections, I'll merge this code to trunks of zope.index and
Thanks in advance.
WBR, Dan Korostelev
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -