Re: Sorting results by Range

2011-09-01 Thread Chris Hostetter
: sort=map(map(myNumField,0,10,0),20,100,0) desc, score desc : sort=map(map(myNumField,0,10,100),20,100,100) asc, score desc ... : By doing the second one, I expected to get the same results, ordered like : 13, 17,18, 20. But, what I got were other values as results, that are not in : the

Re: Sorting results by Range

2011-09-01 Thread Sowmya V.B.
Hi Chris I understood how to handle this now. I tried and I am getting what I wanted. Thanks for a very detailed explanation. I reversed the asc, desc part and was wondering that its not working as I wanted. After seeing the latest mail, I figured out my mistake. Thanks once again! On Fri, Sep

Re: Sorting results by Range

2011-08-24 Thread Sowmya V.B.
Hi Chris Thanks for the clarification. My Doubt:* You said: so if the range of legal values is 0-100, and you care about 10-20 sort=map(map(myNumField,0,10,0),20,100,0) desc, score desc sort=map(map(myNumField,0,10,100),20,100,100) asc, score desc * By doing the first one, I got results with

Re: Sorting results by Range

2011-08-23 Thread Sowmya V.B.
Hi Chris Thanks a lot for the mail. I did not quite understand how that function was made. But, it does work like you said - there is a sorted list of documents now, where documents around value 20 are ranked first and documents around 10 are ranked below. (I chose a field with 0 and 100 as

Re: Sorting results by Range

2011-08-23 Thread Chris Hostetter
: I did not quite understand how that function was made. But, it does work basically the map function just translates values in a ranage to some fixed vald value. so if you nest two map functions (that use different ranges) inside of eachother you get a resulting curve that is flat in those

Sorting results by Range

2011-08-22 Thread Sowmya V.B.
Dear All I have been searching on how to sort Solr results based on a range query..but did not find decipherable answers. Hence, mailing again. Sorry if the query was already posed -i was not able to find it. I want to add an option to sort the results, based on a field range chosen. (For eg:

Re: Sorting results by Range

2011-08-22 Thread Erick Erickson
I guess I'm having trouble understanding this. I just wanted all the results, along with an option to sort the results, if the user wants it. What does all the results mean? The results you would have had if it you didn't have a sort? There's no way to guarantee that the results returned by

Re: Sorting results by Range

2011-08-22 Thread Sowmya V.B.
Hi Eric Let me clarify: 1) The user gives a query, and also has an option to choose the from and to values for a specific field. (For Eg: Give me all documents that match the query Solr Users, but with those that were last updated between 10th and 20th of August ranked on top) -Over here, I am

Re: Sorting results by Range

2011-08-22 Thread Erick Erickson
OK, I think I get it now. There's nothing in Solr that I know of that'll let you do this. Although you could add a clause boosted insanely high, something like date_modified:[aug10 TO aug 20]^1 that would bubble your target results toward the top of your list... Note, that's not the correct

Re: Sorting results by Range

2011-08-22 Thread Sowmya V.B.
Thanks for the clarification Erick! On Mon, Aug 22, 2011 at 4:30 PM, Erick Erickson erickerick...@gmail.comwrote: OK, I think I get it now. There's nothing in Solr that I know of that'll let you do this. Although you could add a clause boosted insanely high, something like

Re: Sorting results by Range

2011-08-22 Thread Chris Hostetter
: 1) The user gives a query, and also has an option to choose the from and : to values for a specific field. : (For Eg: Give me all documents that match the query Solr Users, but with : those that were last updated between 10th and 20th of August ranked on top) : : -Over here, I am currently