cancel
Showing results for 
Search instead for 
Did you mean: 

multiple options in one query

unknown-user
Champ on-the-rise
Champ on-the-rise
Hello there.

I have a doubt of doing multiple conditions in a query. I have this:

"PATH:\"app:company_home/cm:services//.\"");
So i get all the nodes of the specific path.

But from the results, i would like to obtain just the ones which in its name has the name "BIRD", so i would like to do so in the query, instead of having to do a if-else sentence. That would be


AND TEXT:\"BIRD \"

And the hole search…

sp.setQuery("PATH:\"app:company_home/cm:services//.\" AND TEXT:\"BIRD\"");

But the resultSet is empty, when should give 3 results.

What is wrong?

Thanks
Bird
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

This should work.

What results do you get for TEXT:\"BIRD\" ?

I would try using the + syntax instead as there are issues with AND in lucene 1.4.3.

"+PATH:\"app:company_home/cm:services//.\" +TEXT:\"BIRD\""

Regards

Andy