joachim wrote at 2007-3-21 19:06 +0100:
>I want to use Dieter Maurers incremental search. Can I do this without
>using his managable indexes ?
You need to use indexes that are willing to use "IncrementalSearch"
(you should use "IncrementalSearch2" in fact, as the "or" is too
slow for "IncrementalSearch").
Usually, an index works like this:
It fetches the IITreeSet containing the set of documents ids
indexed under the search term.
In the simple case (just one search term), it returns the result.
In more complex cases (e.g. a range search or a set of search terms),
it combines the sets from several look ups via "intersection"
or "multi_union" and returns this result.
The catalog framework combines all these results with "intersection".
This behaviour needs to change in order for "IncrementalSearch2" to
have an effect:
The IITreeSet for a search term is
wrapped by an "IBTree". The "IBTree" behaves like an intelligent
cursor which can either use the tree like access structure
or the linkage of the leaf nodes to quickly move through the
tree able to skip large parts of it without loading from storage.
In case, that partial results need to be combined,
"IAnd" and "IOr" need to be used (rather than "intersection"
If you are interested in the final result, the "asSet" method
needs to be called.
As you see from the decription, it is not difficult for an
index (and the querying framework) to use "IncrementalSearch2"
but it must be done.
Up to now, I only know of "Managable Index" that they do this.
By the way: there is no need that all indexes are "Managable Index"es.
AdvancedQuery can use "IncrementalSearch" with indexes that support
them and work as usual with other indexes. Of course, you will get
fewer gains when some indexes cannot work incrementally.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -