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 > via: > > fq=listid_s:37

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: > Tamas, > > This feels a bit li

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... http://s

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" wou

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 te

Re: Sorting question

2016-04-01 Thread Tamás Barta
Sorry I don't know what you mean. If "listpos" field contains multiple values like "list=pos" then is it possible to order by field value where that field value fits a query? For example list 1 contains: p1 and p2, list 2 contains p2 and p1 in this order, then p1 document has a listpos field wit

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 mean what "rule" determines

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 s

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 or

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 list

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 type

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. It is possible that > a

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 Alexander Ramos Jardim
Another possibility is to put a price:[1 TO *] at your query. 2008/12/16 Ryan McKinley > > sint sorts in numeric order, int does not. > > check the sortMissingLast params in the example config > > > > On Dec 16, 2008, at 12:24 PM, Marc Sturlese wrote: > > >> Hey there, >> >> I am using sort at s

Re: sorting question

2008-12-16 Thread Ryan McKinley
sint sorts in numeric order, int does not. check the sortMissingLast params in the example config On Dec 16, 2008, at 12:24 PM, Marc Sturlese wrote: Hey there, I am using sort at searching time. I would like to know the advantages of using sint field type instead of integer field type.

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 about

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 of

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

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 date.