Michel Pelletier writes:
 > Dieter Maurer wrote:
 > > "near" searches do not work.
 > > ....
 > > The patch at
 > > 
 > >   URL:http://www.handshake.de/~dieter/pyprojects/zope/near.pat
 > > 
 > > enables "near" searches. ....
 > This isn't why I don't want to apply this patch, but rather I think it
 > would be better to specialize TextIndex instead of modifying the
 > existing one and create a new type of index, like a PositionalTextIndex,
 > that works like a text index but uses your patches.
I think, you should do something with the *existing* index.
It cruelly fails for "near" searches (returns no hits).

This probably is no problem for explicit use of the
near operator "...", because it is unlikely that someone will
use it.

However, phrase searches in the form "a b" are mapped to
"near" searches and phrase searches are quite common.

Maybe, the existing index should approximate "..." by "and".

For the time being, I am quite happy with my patch.
At a later time, I may perhaps implement a true positional
index, i.e. the word positions are compacted and stored
in an IISBTree (Int x Int -> String) such that during
search the document need not to be accessed.
Such a thing would rightfully get a special name such
as "PositionalTextIndex".


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to