You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Senthil <ps...@gmail.com> on 2015/12/07 02:33:24 UTC

Match All terms in indexed field value

Scenario: Document should be matched/returned ONLY IF user entered search
text is having ALL the terms of single indexed field in any order.

Ex.
Document has got only 2 fields. Id and title.

Below document is indexed.
{"id":"1", "title": "refrigerator water filter"}

Below search text should NOT return the document as search text is subset of
the indexed field value.
1) water filter
2) refrigerator

Below search texts should return the document as all indexed terms of title
field are present in the search term.
 
1) ABC refrigerator water filter
2) water filter ABC refrigerator
3) water filter refrigerator

Please advise how to model this scenario in SOLR?



--
View this message in context: http://lucene.472066.n3.nabble.com/Match-All-terms-in-indexed-field-value-tp4243895.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Match All terms in indexed field value

Posted by Senthil <ps...@gmail.com>.
Thank You Ahmet for your reply! I tried out the magic what you mentioned and
it worked. It also gave me a direction on how function queries can be
combined together to address few other use cases as well.



--
View this message in context: http://lucene.472066.n3.nabble.com/Match-All-terms-in-indexed-field-value-tp4243895p4255550.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Match All terms in indexed field value

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi Senthil,

Please see my response (FunctionQery) to the same question on the list:
http://find.searchhub.org/document/d3af5d5a74114a07#5081d5c01219dbdf

Thanks,
Ahmet

On Monday, December 7, 2015 4:52 AM, Senthil <ps...@gmail.com> wrote:



Scenario: Document should be matched/returned ONLY IF user entered search
text is having ALL the terms of single indexed field in any order.

Ex.
Document has got only 2 fields. Id and title.

Below document is indexed.
{"id":"1", "title": "refrigerator water filter"}

Below search text should NOT return the document as search text is subset of
the indexed field value.
1) water filter
2) refrigerator

Below search texts should return the document as all indexed terms of title
field are present in the search term.

1) ABC refrigerator water filter
2) water filter ABC refrigerator
3) water filter refrigerator

Please advise how to model this scenario in SOLR?



--
View this message in context: http://lucene.472066.n3.nabble.com/Match-All-terms-in-indexed-field-value-tp4243895.html
Sent from the Solr - User mailing list archive at Nabble.com.