Quoted phrase searching doesn't really work.  Well, it does, but not the way you'd expect.  Zope versions below 2.3.1b2 (all the way down to 2.2.1 AFAICT) used to choke and error out on quoted-phrase searching.  But quoted-phrase searching in Zopes past 2.3.1b2 is essentially turned into an "AND" query instead of erroring out.  So if you do "foo bar", it's roughly equivalent to "foo AND bar".
 
This of course isn't what most people expect, but the machinery for NEAR searching in the catalog was used by the quoting operator (e.g. "foo bar" would become "foo NEAR bar").  Unfortunately, the NEAR searching machinery *never* worked (and still doesnt), so we had to turn the NEAR into an AND to get a reasonable, if misleading, result.  Hopefully we can graft on real NEAR searching in the future.  For now, I think "foo AND bar" is about as close as you're going to get to phrase searching without post-filtering results.
 
----- Original Message -----
From: "Oren Yosifon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 9:35 AM
Subject: [Zope-dev] ZCatalog phrase indexing revisited

Hi all,
I'm asking this again ,in case anything has changed since the last time.
I'm trying to search for a phrase in ZCatalog, but, it doesn't seem to
work.
Let's say I want to search for "foo bar", if i ask ZCatalog to find it,
it treats it as if I wrote "foo OR bar" .

Last time I asked this, SteveA kindly replied:

               You should use quotes to group the phrase.
                 ['"foo bar"']
               Take a look in the source code:
                 lib/python/SearchIndex/UnTextIndex.py
               Follow the flow of code through from line 550: def query(
...
however, this doesn't seem to work. You can try it even on the zope.org
website using their search interface. Using the above suggested syntax
(incl. the brackets) returns an error message.

Can anyone help me ?

Thx.
oren.

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

Reply via email to