Re: Sorting question

2016-04-04 Thread John Bickerstaff
Thanks for sharing the solution Tamas -- I was hoping you'd let us know... On Mon, Apr 4, 2016 at 8:05 AM, Tamás Barta wrote: > Hi, > > FYI: the final solution I found is that I created a custom > "listpos(fieldName, listId)" function and now I can display a sorted list >

Re: Sorting question

2016-04-04 Thread Tamás Barta
Hi, FYI: the final solution I found is that I created a custom "listpos(fieldName, listId)" function and now I can display a sorted list via: fq=listid_s:378 sort=listpos(listpos_s,378) asc Regards, Tamas On Fri, Apr 1, 2016 at 8:55 PM, John Bickerstaff wrote: >

Re: Sorting question

2016-04-01 Thread John Bickerstaff
Tamas, This feels a bit like a "user favorites" problem. I did a little searching and found this... Don't know if it will help, but when I'm looking for stuff like this I find it helps to try to come up with generic or different descriptions of my problem and go search those as well...

Re: Sorting question

2016-04-01 Thread John Bickerstaff
Tamas, I'm brainstorming here - not being careful, just throwing out ideas... One thing that comes up is a separate document in SOLR - one doc for each list. If a user adds a doc to their list, that doc's id gets added to this other type of document... So, a document with the title "List 1"

Re: Sorting question

2016-04-01 Thread John Bickerstaff
OK - I get it. List order is totally arbitrary and cannot be tied to an hard data point. I'll have to think - Perhaps billnbell's solution will help, although I'm not totally sure I understand that suggestion yet. At this point, you could get all the documents for List X that match the search

Re: Sorting question

2016-04-01 Thread billnbell
Put the match into 2 separate fields and index it. Then sort in Solr by the 2 fields is one way Bill Bell Sent from mobile > On Apr 1, 2016, at 11:15 AM, John Bickerstaff > wrote: > > Just to be clear - I don't mean who requests the list (application or user) > I

Re: Sorting question

2016-04-01 Thread Tamás Barta
So, the list order is determined by the user. The user creates a list, adds products to it and i have to display these list using filters and pagination. Let's assume there is list with 1 products in it. In the website where i display the list only 50 products are displayed in a page. So if i

Re: Sorting question

2016-04-01 Thread John Bickerstaff
Oh - and if you send a copy of your query - please include a human-readable version of what your intent is... Something like: Find all the documents that have "blue" in the color field in addition to searching the title field for the user's search term..." ...Or whatever your intent is for this

Re: Sorting question

2016-04-01 Thread John Bickerstaff
Just to be clear - I don't mean who requests the list (application or user) I mean what "rule" determines the ordering of the list? Or, is there even a rule of any kind? In other words, does a user arbitrarily decide that documentA, documentF, and documentW should be on a list of their own? For

Re: Sorting question

2016-04-01 Thread Tamás Barta
Some of the lists are created by users and some are generated by applications, it doesn't matter. It would be fine to solve it in Solr because Solr does the work of filtering and pagination. If sorting were done outside than I would have to read every document from Solr to sort them. It is not an

Re: Sorting question

2016-04-01 Thread John Bickerstaff
Specifically, what drives the position in the list? Is it arbitrary or is it driven by some piece of data? If data-driven - code could do the sorting based on that data... separate from SOLR... Alternatively, if the data point exists in SOLR, a "sub-query" might be used to get the right sort

Re: Sorting question

2016-04-01 Thread Tamás Barta
For example I have to display sellable products which are in list X in the correct order. If I add a "status" and "list" (multivalued) fields to every document (products), then I can execute a query: status:sellable AND list:X, where X is the ID of the list. The list field contains IDs of the

Re: Sorting question

2016-04-01 Thread Alessandro Benedetti
I think this is a classic XY Problem , you are trying to solve X with Y , and you are asking us about Y . Could you describe us what is your X problem ? What are you trying to do with this ordered lists ? If not I would add a field to the product called : list_position ( or a similar name) of

Re: Sorting question

2016-04-01 Thread Binoy Dalal
I don't think I understand your problem properly. Are you trying to pre-sort the products? On Fri, 1 Apr 2016, 19:49 Tamás Barta, wrote: > Hi, > > I have a problem and I don't know how should I solve it in Solr. > > I have products indexed. Every product can be in lists.

Re: A sorting question.

2012-03-06 Thread Chris Hostetter
: problem becomes from MoreLikeThis behaviour. As you probably know that Solr : feature only suggests similar components by the first - and only - document : returned from the original query. That is if you have a query that returns : 5 documents (a query with five IDs with OR boolean clauses,

Re: A sorting question.

2012-03-05 Thread Luis Cappa Banda
Sometimes the solution is so easy that I can't see it in front of me. Thanks, Mikhail! 2012/3/3 Mikhail Khludnev mkhlud...@griddynamics.com Hi Luis, Do you mean q=id:(A^10+OR+B^9+OR+C^8+OR...) I'm not sure whether it woks but q=id:A^10+OR+id:B^9+OR+id:C^8+OR...) definitely does On

Re: A sorting question.

2012-03-03 Thread Luis Cappa Banda
Hi, Erick! And thank you for answering! You always answer my questions, :-) Well, I´ll try to explain better, because the context is more complex. The original problem becomes from MoreLikeThis behaviour. As you probably know that Solr feature only suggests similar components by the first - and

Re: A sorting question.

2012-03-03 Thread Mikhail Khludnev
Hi Luis, Do you mean q=id:(A^10+OR+B^9+OR+C^8+OR...) I'm not sure whether it woks but q=id:A^10+OR+id:B^9+OR+id:C^8+OR...) definitely does On Fri, Mar 2, 2012 at 1:13 PM, Luis Cappa Banda luisca...@gmail.comwrote: Hello! Just a brief question. I'm querying by my docs ids to retrieve the

Re: A sorting question.

2012-03-02 Thread Luis Cappa Banda
The only reference I found is: http://stackoverflow.com/questions/5753079/solr-query-without-order Anyone had the same problem? Maybe using a dynamic field could solve this issue? Thanks! Luis Cappa. 2012/3/2 Luis Cappa Banda luisca...@gmail.com Hello! Just a brief question. I'm

Re: A sorting question.

2012-03-02 Thread Erick Erickson
I'm not quite sure what you mean by order with numeric logic. You're right, the default ordering is by score. I can't think of anything that would arbitrarily sort by a varying input string, that is id:(a OR b OR c OR d) would sort differently than id:(b OR a OR d Or c). Perhaps if you outlined

Solr sorting question to boost a certain field first

2012-02-29 Thread Mike Austin
I have content that I index for several different domains. What I'd like to do is have all search results found for domainA returned first and results for domainB,C,D..etc.. returned second. I could do two different searches but was wondering if there was a way to only do one query but return

Re: Solr sorting question to boost a certain field first

2012-02-29 Thread Mike Austin
Boom! This works: sort=map(query($qq,-1),0, , 1)+desc,score+descqq=domain:domainA Thanks, Mike On Wed, Feb 29, 2012 at 3:45 PM, Mike Austin mike.aus...@juggle.com wrote: I have content that I index for several different domains. What I'd like to do is have all search results found

Re: sorting question

2008-12-20 Thread Chris Hostetter
: sint sorts in numeric order, int does not. Actually i'm pretty sure all of the numeric FieldTypes sort in numeric order using Lucene's built in int/fload sorting -- check out IntField.getSortField. (the Sortable part of the name refers to the fact that the terms sort correctly in index

Re: sorting question

2008-12-16 Thread Ryan McKinley
/sorting-question-tp21037621p21037621.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: sorting question

2008-12-16 Thread Alexander Ramos Jardim
them apear as lasts results? Thanks in advance -- View this message in context: http://www.nabble.com/sorting-question-tp21037621p21037621.html Sent from the Solr - User mailing list archive at Nabble.com. -- Alexander Ramos Jardim

Re: solr sorting question

2008-05-28 Thread Alexander Ramos Jardim
want certain categories to come up first in the sort order. I don't want them to be grouped in ascending order. Please shed some light anyone. How to do it. Is it possible? -- View this message in context: http://www.nabble.com/solr-sorting-question-tp17498596p17498596.html Sent from the Solr

solr sorting question

2008-05-27 Thread anuvenk
categories to come up first in the sort order. I don't want them to be grouped in ascending order. Please shed some light anyone. How to do it. Is it possible? -- View this message in context: http://www.nabble.com/solr-sorting-question-tp17498596p17498596.html Sent from the Solr - User mailing

SOLR sorting - question

2007-12-04 Thread Kasi Sankaralingam
Do I need to select the fields in the query that I am trying to sort on?, for example if I want sort on update date then do I need to select that field? Thanks,

Re: SOLR sorting - question

2007-12-04 Thread climbingrose
I don't think you have to. Just try the query on the REST interface and you will know. On Dec 5, 2007 9:56 AM, Kasi Sankaralingam [EMAIL PROTECTED] wrote: Do I need to select the fields in the query that I am trying to sort on?, for example if I want sort on update date then do I need to

Re: SOLR sorting - question

2007-12-04 Thread Ryan McKinley
Kasi Sankaralingam wrote: Do I need to select the fields in the query that I am trying to sort on?, for example if I want sort on update date then do I need to select that field? I don't think so... are you getting an error? I run queries like: /select?q=*:*fl=namesort=added desc without

RE: SOLR sorting - question

2007-12-04 Thread Kasi Sankaralingam
Thanks a ton, that worked -Original Message- From: Ryan McKinley [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 04, 2007 3:08 PM To: solr-user@lucene.apache.org Subject: Re: SOLR sorting - question Kasi Sankaralingam wrote: Do I need to select the fields in the query that I am trying

Re: SOLR/Lucene sorting - Question/ requesting suggestion

2007-11-29 Thread Ryan McKinley
Kasi Sankaralingam wrote: When we have the following set of data, they are first sorted based on Capital letters and then lower case . Is there a way to make them sort regardless of character case? Avaneesh Bruce Veda caroleY jonathan junit So carole would come after Bruce. Thanks sorting

SOLR/Lucene sorting - Question/ requesting suggestion

2007-11-29 Thread Kasi Sankaralingam
When we have the following set of data, they are first sorted based on Capital letters and then lower case . Is there a way to make them sort regardless of character case? Avaneesh Bruce Veda caroleY jonathan junit So carole would come after Bruce. Thanks

Re: sorting question

2007-03-26 Thread Chris Hostetter
: True, but let me ask the question in a different way. : The problem is that when I run the query and order by date then the : most recent results are not relevant enough (in general I find I need i wasn't suggesting you have Solr sort by date, i was suggesting you do exactly what you asked

Re: sorting question

2007-03-24 Thread shai deljo
True, but let me ask the question in a different way. The problem is that when I run the query and order by date then the most recent results are not relevant enough (in general I find I need to do work on top of what solr provides in order to get good relevancy) so I guess I'm looking more for

Re: sorting question

2007-03-23 Thread Chris Hostetter
: Is there a way (in 1 query) to retrieve the best scoring X results and : then sort them by another field (date for example)? not at the moment. keep in mind, this is the type of thing that can be done easily on the client side -- pull back the top X results sorted by score, then sort by

Re: sorting question

2007-03-23 Thread Walter Underwood
You could also promote recent results with a function query term. I've done that for news sites, where recency is an important part of relevancy. --wunder On 3/23/07 4:59 PM, Chris Hostetter [EMAIL PROTECTED] wrote: : Is there a way (in 1 query) to retrieve the best scoring X results and :