daevaorn / djapian

High level Xapian integration for Django
Other
6 stars 3 forks source link

returbinig ResultSet method #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Could you give me some explanations about returbinig ResultSet method ?
prefetch and flags goals ? Maybe I missed some documentation ?
and order_by doesn't change my result order... where could I find some
examples ?

Original issue reported on code.google.com by sforne...@gmail.com on 18 Sep 2009 at 2:51

GoogleCodeExporter commented 9 years ago
Need to update wiki page

Original comment by daevaorn on 19 Sep 2009 at 9:44

GoogleCodeExporter commented 9 years ago
I still can not order my results. Can I have a small example?
I am using:
results=Object.indexer.search(query).order_by(tag_name)
and changing tag_name or adding '-' in front of tag_name doesn't change the 
order...
what's wrong ?

Original comment by sforne...@gmail.com on 6 Oct 2009 at 9:06

GoogleCodeExporter commented 9 years ago
I dug a little and in fact I need
Enquire::set_sort_by_value() 
as describe here: http://xapian.org/docs/sorting.html
and it seems that djapian doesn't yet enable to select it...

Original comment by sforne...@gmail.com on 9 Oct 2009 at 9:48

GoogleCodeExporter commented 9 years ago
Djapian has used sort_by_relevance_then_value for 2.3 and older versions. Just 
now
(in trunk) I've changed default behavior to sort_by_value_then_relevance and 
have
added `relevance_first` flag (default=False) to order_by method of ResultSet. 
It will
help to 

Hope this helps and make ordering more predictable for users.

Original comment by daevaorn on 12 Oct 2009 at 5:14