How to search based on relevance in solr? -
i querying solr based on number of filters such content name, size 1 of these filters relevance. using solrquery api add together filters solr.
solrquery query = new solrquery(); query.set("q", mquerystring); query.addfilterquery(name);
but not able find value set relevance.
how can create search happen based on content relevance.can help?
relevance of search results calculated during search, , deppends on 2 things: query , content of search results. exact formula upon relevance calculated called tf-idf, explained in detail here http://www.tfidf.com/
if wish, can create different fields in solr (title, subject) scored higher content of page, making query hits there more relevant. called field boosting , explained here: https://wiki.apache.org/solr/solrrelevancyfaq#how_can_i_make_.22superman.22_in_the_title_field_score_higher_than_in_the_subject_field
solr
No comments:
Post a Comment