If you want to do this in Solr, I’d suggest asking on the Solr user list.
As I understand it, what you are asking will be hard to do. Scoring is done, by Lucene, within the QueryComponent, which executes before the FacetComponent has executed, so there is no knowledge of facet values/counts at the time of scoring. To enhance your score, you will need to use an existing Function Query, or implement your own, as a ValueSourceParser. Upayavira On Mon, Mar 23, 2015, at 10:41 AM, thakkar.aayush wrote: > Whenever a term is searched, we display the results and related tags. (We > provide tags to each post using pre defined tags library) We would like > to > improve the tag suggestions to the user. > > In the current implementation, related tags are shown based on facet > counts > for the search. But we intend to use combination of search relevance > score > (using lucene which uses vestor space model) with the search query and > the > facet count both. > > We tried implementing the following : > > Suggesting the tags to the user on the custom score that is uses facet > count > and search relevance score both. Mathematical model: > > CustomScore= ((score - 1) * 0.3 + 1) * facetCount > score - Actual score of the faceted tags that lucene gives when searched > against the search query. > facetCount - Facet count of the results extracted from the searches shown > to > the user. > 0.3 - Boost factor > > Any suggestion on this approach or better ways to get better tags based > on > relevancy and facet count? > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Improve-suggestion-tags-for-solr-search-query-tp4194633.html > Sent from the Lucene - General mailing list archive at Nabble.com.
