cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple PATH in luceneSearch

loic
Champ in-the-making
Champ in-the-making
Hi,

I'm wondering if it is possible to indicate multiple "PATH" in a lucene search

I have the following code in my freemarker template but it returns me nothing (it should !)

<#assign projet="${webproject}">
<#assign recherche="TEXT:*${searched}* OR QNAME:*${searched}* AND
PATH:\"www/avm_webapps/ROOT/contenu/actualites//*\" OR
PATH:\"www/avm_webapps/ROOT/contenu/communiques//*\" OR
PATH:\"www/avm_webapps/ROOT/contenu/infoperenne//*\"">

<#list avm.stores as store>
     <#if store.name=projet>
           <#list store.luceneSearch(recherche) as node>
                 ${node.path}
           </#list>
     </#if>
</#list>

I'm sure it's not a big deal but I can't find any clue in the wiki…

I'll appreciate if someone could help me Smiley Happy
2 REPLIES 2

kbonnet
Champ in-the-making
Champ in-the-making
I'm thinking of either grouping of your query via brackets around the "and"  and " or" groups. But i also think is that you dont need three PATH parts. First, i think the path takes qnames, so PATH:"/cm:www/cm:avm_webapps/". Second, you can use wildcards in xPath paths. Try PATH:"/cm:www/cm:avm_webapps//*". This would search everything under the mentioned path.

Hope this is relevant for you!

Koen

lista
Star Contributor
Star Contributor
Hi,

enter this query in the Node Browser Lucene search and it will go through:

PATH:"/app:company_home/app:Sites/*" OR PATH:"/app:company_home/app:dictionary/*"

So, it definitely is possible. I suppose something is off with your Freemarker syntax.

Cheers,
Ivan.