AnsweredAssumed Answered

Doubt about Lucene search terms and grouping of terms

Question asked by damiar on Nov 11, 2008
Latest reply on Nov 11, 2008 by damiar
Hi,

I'm trying to make a Lucene query and I'm using documentation provided by Lucene and Alfresco's wiki, but when I test my query in the node browser I always get all the nodes of the folder where I'm searching for.

Here is the query I'm using:

+PATH:"/app:company_home/cm:customPath/cm:customChild/cm:folder/*"
@cm\:name:"queryTerm" @cm\:title:"queryTerm" @cm\:description:"queryTerm"

(I've separated the query to make it more readable)

I want to search for the nodes contained in the given folder and matching any of the given fields. If no field matchs with 'queryTerm' the query must return an empty array.

I think the equivalent SQL code of the Lucene query that I want to make should look like this:

SELECT * FROM table WHERE path="path/to/folder" AND (field1 LIKE queryTerm OR field2 LIKE queryTerm OR field3 LIKE queryTerm …)

Any help?

Thanks!

Outcomes