Re: SOLR ranking

2016-02-19 Thread Alessandro Benedetti
Ok Binoy, now it is clearer :) Yes, if add sorting and faceting as additional optional requirements, doing 2 queries could be a perilous path ! Cheers On 19 February 2016 at 09:24, Ere Maijala wrote: > If he needs faceting or something (I didn't see that specified), doing two > queries won't do

Re: SOLR ranking

2016-02-19 Thread Ere Maijala
If he needs faceting or something (I didn't see that specified), doing two queries won't do, of course.. --Ere 19.2.2016, 2.22, Binoy Dalal kirjoitti: Hi Alessandro, Don't get me wrong. Using mm, ps and pf can and absolutely will solve his problem. Like I said above, my solution is meant to b

Re: SOLR ranking

2016-02-18 Thread Binoy Dalal
Hi Alessandro, Don't get me wrong. Using mm, ps and pf can and absolutely will solve his problem. Like I said above, my solution is meant to be a quick and dirty fix. It's really not that complex and shouldn't take more than an hour to setup at the app level. Moreover I suggested it because he sai

Re: SOLR ranking

2016-02-18 Thread Alessandro Benedetti
Hey Binoi , can't understand why such complexity to be honest :/ Can you explain me why playing with : edismax mm ( percentage of query terms you want to be in the results) pf ( the fields you want to be boosted if phrase matches ) ps ( slop to allow) Should not solve the problem instead of the 2

Re: SOLR ranking

2016-02-18 Thread Binoy Dalal
Here's an alternative solution that may be of some help. Here I'm assuming that you are not directly outputting the search results to the user and have some sort of layer between the results from solr and presentation to the user where some additional processing can be performed. 1) You already kn

Re: SOLR ranking

2016-02-18 Thread Emir Arnautovic
Hi Nitin, Can you send us how your parsed query looks like (from debug output). Thanks, Emir On 17.02.2016 08:38, Nitin.K wrote: 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

Re: SOLR ranking

2016-02-17 Thread Nitin.K
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. ki

Re: SOLR ranking

2016-02-16 Thread david.w.smi...@gmail.com
I just want to interject to say one thing: You *can* sort on multi-valued fields as-of recent Solr 5 releases. it's done using the "field" function query with either a "min" or "max" 2nd argument: https://cwiki.apache.org/confluence/display/solr/Function+Queries Of course it'd be nicer to simply s

Re: SOLR ranking

2016-02-16 Thread Alessandro Benedetti
Sorry for the misleading mail, actually if you play with the slop factor, that is going to be easy. A proximity search can be done with a sloppy phrase query. The closer > together the two terms appear in the document, the higher the score will > be. A sloppy phrase query specifies a maximum "slop

Re: SOLR ranking

2016-02-16 Thread Alessandro Benedetti
You can describe the pf field as an exact phrase query : ""~0 . But You can specify the slop with : The ps Parameter Default amount of slop on phrase queries built with pf, pf2 and/or pf3 fields (affects boosting). Just take a look to the edismax page in the wiki, it seems well described : http

Re: SOLR ranking

2016-02-16 Thread Binoy Dalal
By my understanding, it will depend on whether you're explicitly running the phrase query or whether you're also searching for the terms individually. In the first case, it will not match. In the second case, it will match just as long as your field contains all the terms. On Tue, 16 Feb 2016, 17:

Re: SOLR ranking

2016-02-16 Thread Modassar Ather
In that case will a phrase with a given slop match a document having the terms of the given phrase with more than the given slop in between them when pf field and mm=100%? Per my understanding as a phrase it will not match for sure. Best, Modassar On Tue, Feb 16, 2016 at 5:26 PM, Alessandro Bene

Re: SOLR ranking

2016-02-16 Thread Alessandro Benedetti
If I remember well , it is going to be as a phrase query ( when you use the "quotes") . So the close proximity means a match of the phrase with 0 tolerance ( so the terms must respect the position distance in the query). If I remember well I debugged that recently. Cheers On 16 February 2016 at 1

Re: SOLR ranking

2016-02-16 Thread Modassar Ather
Actually you can get it with the edismax. Just set mm to 100% and then configure a pf field ( or more) . You are going to search all the search terms mandatory and boost phrases match . @Alessandro Thanks for your insight. I thought that the document will be boosted if all of the terms appear in c

Re: SOLR ranking

2016-02-16 Thread Emir Arnautovic
Hi Nitin, Not sure if you changed what fields you use for phrase boost, but in example you sent, all fields except content are "string" fields and content is boosted with 6 while topic_title in qf is boosted with 100. Try setting same field you use in qf in pf2 and you should see the differenc

Re: SOLR ranking

2016-02-16 Thread Alessandro Benedetti
Nithin, have you read my reply ? 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) > On 16 February 2016 at 10:45, Binoy Dalal wrote: > Based on a quick look at the documentation, I think that you should use > termPositions=true

Re: SOLR ranking

2016-02-16 Thread Binoy Dalal
Based on a quick look at the documentation, I think that you should use termPositions=true to achieve what you want. On Tue, 16 Feb 2016, 16:08 Nitin.K wrote: > Hi Emir, > > I tried using the boost parameters for phrase search by removing the > omitTermFreqAndPositions from the multivalued field

Re: SOLR ranking

2016-02-16 Thread Nitin.K
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 mutua

Re: SOLR ranking

2016-02-16 Thread Nitin.K
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

Re: SOLR ranking

2016-02-16 Thread Binoy Dalal
@Nitin Why are you phrase boosting on string fields? More often than not, it won't do anything because the phrases simply won't match the entire string. On Tue, 16 Feb 2016, 15:36 Alessandro Benedetti wrote: > Binoy, the omitTermFreqAndPositions is set only for text_ws which is used > only on th

Re: SOLR ranking

2016-02-16 Thread Alessandro Benedetti
Binoy, the omitTermFreqAndPositions is set only for text_ws which is used only on the "indexed_terms" field. The text_general fields seem fine to me. Are you omitting norms on purpose ? To be fair it could be relevant in title or short topic searches to boost up short field values, containing a lo

Re: SOLR ranking

2016-02-15 Thread Emir Arnautovic
Hi Nitin, You can use pf parameter to boost results with exact phrase. You can also use pf2 and pf3 to boost results with bigrams (phrase matches with 2 or 3 words in case input is with more than 3 words) Regards, Emir On 16.02.2016 06:18, Nitin.K wrote: I am using edismax parser with the fo

Re: SOLR ranking

2016-02-15 Thread Binoy Dalal
Firstly to do phrase searching, you need to set omitTermFreqAndPositions=false. You've set this to true. This will require a reindex. Secondly it will be helpful to check the debug Query output and see how the query is parsed and searched. On Tue, 16 Feb 2016, 12:28 Modassar Ather wrote: > First

Re: SOLR ranking

2016-02-15 Thread Modassar Ather
First it will search for "Eating Disorders" together and then the individual words "Eating" and "Disorders" I don't think the phrase will be searched as individual ANDed terms until the query has it like below. "Eating Disorders" OR (Eating AND Disorders). Best, Modassar On Tue, Feb 16, 2016 at

Re: SOLR ranking

2016-02-15 Thread Nitin.K
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

Re: SOLR ranking

2016-02-15 Thread Binoy Dalal
You'll have to provide more information. How exactly do you want phrase search to work and how is it not working properly? On Tue, 16 Feb 2016, 00:08 Nitin.K wrote: > Thanks Binoy.. > > I have used the boost parameters and its working as expected. > I also need to give the priority to the phrase

Re: SOLR ranking

2016-02-15 Thread Nitin.K
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 cont

Re: SOLR ranking

2016-02-15 Thread Binoy Dalal
I'm sorry, missed that part. It's true, you cannot sort on multivalued fields. The workaround will be pretty complex; you'll either have to find the max or min value of the fields at index time and store those in separate fields and use those to sort, or somehow come up with some function that can

Re: SOLR ranking

2016-02-15 Thread Nitin.K
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

2016-02-15 Thread Emir Arnautovic
Hi, Not sure how ordering will help (maybe missing question) but what seems to me that would help your case is simple boosting. See https://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_make_.22superman.22_in_the_title_field_score_higher_than_in_the_subject_field Regards, Emir On 15.02.2

Re: SOLR ranking

2016-02-15 Thread Binoy Dalal
Use the sort parameter with your query and pass the fields in the order in which you want to sort them. So if you want topic > subtopic > index > drug > content all ascending, your sort parameter will look like &sort=topic asc,subtopic asc,index asc,drug asc,content asc On Mon, 15 Feb 2016, 18:17

Re: Solr ranking query..

2014-02-04 Thread Varun Thacker
Hi Chris, An example for point 3 could be - &boost=recip(field(domainRank),0.1,1,1) http://wiki.apache.org/solr/FunctionQuery#recip "recip(x,m,a,b) implementing a/(m*x+b). m,a,b are constants, x is any numeric field or arbitrarily complex function." So with these values when domainRank is 1 it w

Re: Solr ranking query..

2014-02-04 Thread Chris
Dear Varun, Thank you for your replies, I managed to get point 1 & 2 done, but for the boost query, I am unable to figure it out. Could you be kind enough to point me to an example or maybe advice a bit more on that one? Thanks for your help, Chris On Tue, Feb 4, 2014 at 3:14 PM, Varun Thacker

Re: Solr ranking query..

2014-02-04 Thread Varun Thacker
Hi Chris, I think what you are looking for could be solved using the eDismax query parser. https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser 1. Your Query Fields ( qf ) would be - "urlKeywords^60 title^40 fulltxt^1" 2. To check on adultFlag:N you could use &fq=ad