Hello Erick,
Erick Erickson wrote > > Lucene (where the sorting happens) assembles a list of all the unique > *values* for a sort field and sorts the result set by comparing to that > list. It doesn't sort all the documents per-se. > Hmm, still confused. What do you mean by "sorts by comparing the result set to the list"? From my understanding of your statement,the sort place/ranking of a document will depend on how it compares to a specific element in the list (was thinking of the concept of a binary insertion sort or something along that line)? Erick Erickson wrote > > It doesn't sort all the documents per-se. > Why not? why can't the result set mentioned earlier be the set of all the documents in the index? (assuming one document <-> one index for the sort field) Erick Erickson wrote > > About the ordering. I think you've got it pretty much correct, but I have > to ask whether this is a curiosity question or if there's some behavior > you want to see? > I believe knowing this will help me construct my queries more efficiently (also with the help of trial and error and stress tests). Read about this earlier which triggered my question. (http://www.derivante.com/2009/04/27/100x-increase-in-solr-performance-and-throughput/) Is there a quick list or can you recommend a documentation/book where I can find this for the common query params (edismax/standard)? Though I guess you can trace this from the actual source code (guessing need to look at the query parser classes..) but I was hoping there would be a quick ref for this. Erick Erickson wrote > > And a note about sorting on timestamps. You'll do yourself a favor if > you use the coarsest time you can. Lucene assembles a list of all > unique values as I mentioned above for a sort field. That list can be > much smaller if you can round to hour (or day or .....). Of course for > a small index this won't matter much, but if it's a larger one... And what > you do here depends on the use-case you're satisfying of course. > Noted. I'm not yet sure on how precise my sort field should be as my requirement is to find the latest videos uploaded (probably can argue to set precision to seconds or even minutes). Still confused whether if what I want to happen is supported by boost or sort. Generally, I am not really keen on using boost as this would affect the score and would need to find a good boosting function and modify it accordingly (which may mean more tests and such which I don't want to spend much time if possible). I am more inclined on having an exact sort on all records in which I want solr to return... for example the top 5 most recent documents (which I want to clarify if this is what the sort param is doing) Somewhat like this: select * from (select * from videos order by upload_dt desc) limit 5 If I cannot do this by sort, I guess boost/boost function is the way to go. Thanks again :). Sorry for the long post. First time using solr/lucene so I'm still grasping at straws :|. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-sort-param-behavior-clarification-tp3709248p3710581.html Sent from the Solr - User mailing list archive at Nabble.com.