[CPS-users] Complex queries in NXLucene

Lennart Regebro regebro at gmail.com
Wed Feb 28 07:52:20 CET 2007


On 2/28/07, Julien Anguenot <ja at nuxeo.com> wrote:
> Lennart Regebro wrote:
> > I've been looking at the query possibilities in NXLucene, and it seems
> > to me that there is no way to group parts of query like, say:
> >
> >  (path=/a/b/c and depth=3) or (uid=/a/b or uid=/a)
> >
> > I can make an ungroupd query, of course, which means
> >
> >  (path=/a/b/c or uid=/a/b or uid=/a) and (depth=3)
> >
> > but that's not what I need, since that will apply the depth for the
> > whole query.
> >
> > I'd just like to confirm that before I start implementing another
> > complex solution to my problem (doing two separate queries and merging
> > them).
>
> I don't remember if this kind if queries are possible or not.... George
> added some stuffs some weeks ago on internal boolean queries and boolean
> clauses. Has to be checked out but I believe it is not.
>
> I would suggest you to implement the second search API on the server.
> (i.e : def xmlrpc_search(self, query_str='')). It aims at taking as
> parameter a native Lucene query with which you should be able to express
> you complex queries more easily.
>
> Or better, implementing grouped queries on the NXLucene query directly.

OK, thanks, I hope to get the time to look into this. I did work
around it with multiple queries for the moment, and it works but it's
not fast. :-)

It has also been agreed that it's a mistake in Plone to have the
navigation catalog and the search catalog be the same, so maybe it'll
get fixed in Plone too. :-)

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.