You could index place name as both a text field and a separate keyword string field. The former would match on any word. The latter would match only on exact match (or wildcard) and could be boosted as you have indicated since it would be an exact match.

You can just do a copyField from one to the other. For the exact match field, use the KeywordTokenizerFactory plus a LowerCaseFilterFactory filter.

-- Jack Krupansky

-----Original Message----- From: Ramzi Alqrainy
Sent: Monday, August 27, 2012 9:37 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr Partial and Exact Matching

Please allow me to add another document with another example.

D3 :

Place Title : Pizza Jons
Review : I love it.

When the user search for pizza [General Query] we need to decrease the rank
for place title and gets
Little Caesar
Pizza hut
Pizza Jons

When we search for Jons [Search For Name]
Pizza Jons

When we search for Pizza Hut [Exact Match]
Pizza Hut





--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Partial-and-Exact-Matching-tp4003478p4003489.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to