RE : [CPS-devel] zctextindex: everything except 'some words'
"Winterflood, Jonathan" <[email protected]>
| Newsgroups | gmane.comp.web.zope.cps.devel |
|---|---|
| Message-ID | <2A5D32A4E4678A4D8A8AF34E3B0A785F26DDC4@CORPMAIL31.corp.capgemini.com> |
Ok, I ended up seeing the exceptions in the logs about my 'NOT' at the beginning of the request I'll probably customize that code, seen as it's going to be more intuitive and more useful (in my application at least) Thanks, Jonathan ________________________________ De: Florent Guillaume [mailto:[email protected]] Date: sam. 10/03/2007 16:42 À: Winterflood, Jonathan Cc: [email protected] Objet : Re: [CPS-devel] zctextindex: everything except 'some words' Yes, ZCTextIndex only allows NOT when preceded by AND. Really, operators are OR, AND and AND NOT. Also super-wildcards are disallowed by the code. You could change globToWordIds in lib/python/Products/ZCTextIndex/ Lexicon.py to allow for them. Florent On 8 Mar 2007, at 11:54, Winterflood, Jonathan wrote: > > Hi, > > I'm doing a search in the ZCatalog on a ZCTextIndex, and I'm not > getting any results on a particular search > > The different modes I'm using are 'ET', 'OU', and 'SAUF' (just in > my form) > 'ET' is all the requested words > the query I use is "word AND > word AND word" > 'OU' is any of the requested words > "word OR word OR word" > 'SAUF' is none of the words > "NOT word AND NOT word AND NOT word" > > The first two work just fine, but the last one never returns > anything, even in combination with other query requirements: > e.g.: > {'sort_on': 'dateSignature', 'cps_filter_sets': {'operator': 'and', > 'query': ['searchable']}, 'portal_type': ('dbr_loi', > 'dbr_loi_partie'), 'path': '/DBR/sections', 'dateSignature': > {'query': ['8/3/2003', '8/3/2010'], 'range': 'minmax'}, 'title': > 'NOT workflow '} > does not return anything, even though > {'sort_on': 'dateSignature', 'cps_filter_sets': {'operator': 'and', > 'query': ['searchable']}, 'portal_type': ('dbr_loi', > 'dbr_loi_partie'), 'path': '/DBR/sections', 'dateSignature': > {'query': ['8/3/2003', '8/3/2010'], 'range': 'minmax'}} > does, and the results don't all have 'workflow' in their title > > Must there necesarily be a inclusive term in the ZCTextIndex query? > Is there a super-wildcard that includes everything? > > I noticed * and ? can only be used with at least one letter before > them, so "* AND NOT word" doesn't work either... > > TIA, > Jonathan > > > > This message contains information that may be privileged or > confidential and is the property of the Capgemini Group. It is > intended only for the person to whom it is addressed. If you are > not the intended recipient, you are not authorized to read, print, > retain, copy, disseminate, distribute, or use this message or any > part thereof. If you receive this message in error, please notify > the sender immediately and delete all copies of this message. > _______________________________________________ > cps-devel mailing list > http://lists.nuxeo.com/mailman/listinfo/cps-devel -- Florent Guillaume, Director of R&D, Nuxeo Open Source Enterprise Content Management (ECM) http://www.nuxeo.com <http://www.nuxeo.com/> http://www.nuxeo.org <http://www.nuxeo.org/> +33 1 40 33 79 87 This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. _______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel