SOLR ranking
I have five fields in SOLR topic_title subtopic_title index_terms - Multivalued drug - Multivalued content - Now, I want to rank the documents with all these fields; I want all those documents that are haivng the search term in topic_title will come first in the order then documents having search term in subtopic title and then so on. Example : If two documents are having search term in topic_title then the solr should look for subtopic_ title similarly if the search term is present in both topic_title and subtopic_title fields then it should look for index term and so on; to decide the ranking order - I dont want to consider the no. of occurrences in multivalued fields but if the two documents are having search term in topic_title, subtopic_title, index_term and drug then the documents should be ranked in the order of no. of occurrences inside the content field. Kindly help in this. I will be really thankful -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
Thanks Binoy.. Actually it is throwing following error: can not sort on multivalued field: index_term -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257378.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
Thanks Binoy.. I have used the boost parameters and its working as expected. I also need to give the priority to the phrase search. Kindly suggest on this. I am using edismax parser right now. Using pf, pf2 and pf3 parameters but that too are not working properly. -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257420.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
I am using edismax parser with the following query: localhost:8983/solr/tgl/select?q=eating%20disorders&wt=xml&tie=1.0&rows=200&q.op=AND&indent=true&defType=edismax&stopwords=true&lowercaseOperators=true&debugQuery=true&qf=topic_title%5E100+subtopic_title%5E40+index_term%5E20+drug%5E15+content%5E3&pf2=topTitle%5E200+subTopTitle%5E80+indTerm%5E40+drugString%5E30+content%5E6 Configuration of schema.xml I want , if user will search for a phrase then that pharse should always takes the priority in comaprison to the individual words; Example: "Eating Disorders" First it will search for "Eating Disorders" together and then the individual words "Eating" and "Disorders" but while searching for individual words, it will always return those documents where both the words should exist for which i am already using q.op="AND" in my query. Thanks, Nitin -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257510.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
You are absolutely right Binoy..!! But my problem is; We don't want the term frequency to take into account for index term as well as drug. (i.e. Don't want to consider the no. of occurrences of search term for both of these fields.) Is it possible that i can omit the term frequency for these two fields and also indexed them with term positions for phrase search ?? I tried using omitTermFreqAndPositions="true" and omitPositions="false" but thats not working for me. Thanks, Nitin -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257551.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
Hi Emir, I tried using the boost parameters for phrase search by removing the omitTermFreqAndPositions from the multivalued field type but somehow while searching phrases; the documents that have exact match are not coming up in the order. Instead; in the content field, it is considering the mutual count of both the terms and based on that, its deciding the order. kindly let me know, how can i first search the phrase and then go to the individual words (i.e word-1 AND word-2) -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257556.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR ranking
Hi Binoy, We are searching for both phrases and individual words but we want that only those documents which are having phrases will come first in the order and then the individual app. termPositions = true is also not working in my case. I have also removed the string type from copy fields. kindly look into the changed configuration below: Hi Emir, I have changed the cofiguration as per your suggestion, added pf2 / pf3. Yes, i saw the difference but still the ranking is not getting followed correctly in case of phrases. Changed configuration; Copy fields again for the reference : Added following field type: Removed the string type from the copy fields. Changed Query : http://localhost:8983/solr/tgl/select?q=rheumatoid%20arthritis&wt=xml&tie=1.0&rows=200&q.op=AND&indent=true&defType=edismax&stopwords=true&lowercaseOperators=true&debugQuery=true&; pf=topTitle^200 subtopTitle^80 indTerm^40 drugString^30 tglData^6& pf2=topTitle^200 subtopTitle^80 indTerm^40 drugString^30 tglData^6& pf3=topTitle^200 subtopTitle^80 indTerm^40 drugString^30 tglData^6& qf=topic_title^100 subtopic_title^40 index_term^20 drug^15 content^3 After making these changes, I am able to get my search results correctly for a single term but in case of phrase search, i am still not able to get the results in the correct order. Hi Modassar, I tried using mm=100, but the order is still the same. Hi Alessandro, I have not yet tried the slope parameter. By default it is taking it as 1.0 when i looked it in debug mode. Will revert you definitely. So, let me try this option too. All, Please suggest if anyone is having any other suggestion on this. I have to implement it on urgent basis and i think i am very close to it. Thanks all of you. I have reached to this level just because of you guys. Thanks and Regards, Nitin -- View this message in context: http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257782.html Sent from the Solr - User mailing list archive at Nabble.com.