cancel
Showing results for 
Search instead for 
Did you mean: 

Exclude path in lucene query

billerby
Champ on-the-rise
Champ on-the-rise
Is there a way to exclude a folder in a store from a lucene search? I have had no luck using this:

+TYPE:"{http://www.mycompany.com/model/1.0}produktion" -PATH:"/app:company_home/cm:Arkivet/*"

I am still getting results residing in (or in a subfolder to) the path specified.

Thanks
/Erik
4 REPLIES 4

billerby
Champ on-the-rise
Champ on-the-rise
Found it Smiley Happy

From the wiki:

To find all nodes at any depth below "/sys:user":

PATH:"/sys:user//*"

My working query:

+TYPE:"{http://www.mycompany.com/model/1.0}produktion" -PATH:"/app:company_home/cm:Arkivet//*"

fred_pack
Champ in-the-making
Champ in-the-making
Hi,

Can you explain where you place the exclusion to obtain this result

I would like to exclude spaces from lucene searches too, but i don't know how to do, and it seem that you find out how to make that …

Many thanks

Fred.

billerby
Champ on-the-rise
Champ on-the-rise
Well, the query above works in my environment. I'll guess you just have to convert it to match your types/paths.

If you have a query that don't work as expected, please post it here and I'll have a look.

Regards
/Erik

ganeshnaidu
Champ in-the-making
Champ in-the-making
Thanks Erik
Your query saved me a lot of time from searching