Skip to Content
0
Former Member
May 20, 2016 at 11:54 PM

Solr increase relevancy for documents

147 Views

Hi all,

I'm working with a customer who is looking to improve the relevancy of the documents being returned by Solr. They are having an issue where they expect certain results to rank higher than others because the search term used matches exactly words found in the 'name' attribute on the Catalog side.

For example, (the client is pt_BR) search for term 'boneca' returns documents with both Boneco (actually returned higher in results) than items with Boneca..they do get both results though. Looking in to this issue, the text_pt field (the one used to analyze this property) uses the BrazilianStemFilterFactory (BSF) which stems that word down to 'bonec' ..confirmed this is used in querying and would explain this behaviour.

So I understand that that's the reason why we're getting mixed results of Boneca & Boneco items together. Is there a easy way to force documents to be more relevant where the 'name' matches/scores high because of exact match like this?

A possible solution for example, create another property on the product item like 'tags' that is set to string type & multivalued on the indexed type so they could enter in words that could be searched on with exact matches? Would require a bit more management of their products but this could be helpful in special cases where they need to boost relevancy of otherwise similar documents due to the way the terms are analyzed/tokenized during querying.

Other ways that are more straightforward?

Thanks, Dave