search for: set_sort_by_value_then_relev

Displaying 5 results from an estimated 5 matches for "set_sort_by_value_then_relev".

2018 Mar 30
2
sorting large msets
...>add_boolean_term('T' . 'ghost'); $xdb->add_document($doc); } $xdb->commit_transaction; } my $enquire = Search::Xapian::Enquire->new($xdb); my $mail_query = Search::Xapian::Query->new('T' . 'mail'); $enquire->set_query($mail_query); $enquire->set_sort_by_value_then_relevance(0, 1); my $offset = 0; my $limit = 200; my $t0 = clock_gettime(CLOCK_MONOTONIC); my $mset = $enquire->get_mset($offset, $limit); my $t1 = clock_gettime(CLOCK_MONOTONIC); my $elapsed = $t1 - $t0; $xdb = undef; $tmp = undef; print $elapsed, "\n"; __END__
2007 Oct 16
1
Matches estimate varies with sorting method
...t::get_matches_estimated() varies depending on how results are to be sorted. For instance, in my index, value 4 contains date and time in the format "yyyymmddhhmmss". For the same query, the number of results will be estimated to 20000+ when results are first sorted by date and time with set_sort_by_value_then_relevance(4) and to only 100 if I use set_sort_by_relevance(). The first figure is the correct one. Note that the MSet is obtained with Enquire::get_mset(0, 100, 101), so that probably explains where the 100 comes from. The estimate will also be correct with set_sort_by_relevance_then_value(4). If I a...
2018 Mar 30
0
sorting large msets
On Fri, Mar 30, 2018 at 05:21:43PM +0000, Eric Wong wrote: > Hello, is there a way to optimize sorting by certain values > for queries which return a huge amount of results? [...] > $enquire->set_sort_by_value_then_relevance(0, 1); If you're just wanting the 200 newest, it'll be faster not to calculate weights, so: $enquire->set_sort_by_value(0, 1); $enquire->set_weighting_scheme(new Xapian::BoolWeight()); For me, this drops the time from ~0.075 seconds to ~0.067 seconds (with xapian-core 1.4.5)....
2018 Mar 31
2
sorting large msets
Olly Betts <olly at survex.com> wrote: > On Fri, Mar 30, 2018 at 05:21:43PM +0000, Eric Wong wrote: > > Hello, is there a way to optimize sorting by certain values > > for queries which return a huge amount of results? > [...] > > $enquire->set_sort_by_value_then_relevance(0, 1); > > If you're just wanting the 200 newest, it'll be faster not to calculate > weights, so: > > $enquire->set_sort_by_value(0, 1); > $enquire->set_weighting_scheme(new Xapian::BoolWeight()); > > For me, this drops the time from ~0.075 seconds to ~0...
2012 Apr 27
4
GSoC xapian node binding
Posting recent offline discussion... On Fri, Apr 27, 2012 at 10:55 AM, Marius Tibeica <mtibeica at gmail.com> wrote: > Hi Liam, > > I've added the Enquire class and designed a query spec structured as a JS > object. Hope you like it :) > I'll probably be off a few days (there is a national holiday Tuesday which > means i have a long weekend :D) but maybe I'll