You need some parentheses:

title:john doe^30 OR description:john doe^10

should be:

title:(john doe)^30 OR description:(john doe)^10

-- Jack Krupansky

-----Original Message----- From: michael.boom
Sent: Tuesday, October 29, 2013 7:20 AM
To: solr-user@lucene.apache.org
Subject: Phrase query combined with term query for maximum accuracy

For maximum search accuracy on my SolrCloud system i was thinking of
combining phrase search with term search in the following way:
search term: john doe
search fields: title, description - a match in the title is more relevant
than one in the description

What i want to achieve - the following document ranking:
1. a hard match for "john doe" in the title
2. a  hard match for "john doe" in the description
3. a match of "john" OR "doe" in the title
4. a match of "john" OR "doe" in the description

What I've got until now:
Using edismax parser:
q.op=or&q=title:"john doe"^100 OR description:"john doe"^50 OR title:john
doe^30 OR description:john doe^10

Would the above query provide me what i want, or is there a better way to do
it?
Thanks!




-----
Thanks,
Michael
--
View this message in context: http://lucene.472066.n3.nabble.com/Phrase-query-combined-with-term-query-for-maximum-accuracy-tp4098215.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to