search for: set_sort_by_valu

Displaying 15 results from an estimated 15 matches for "set_sort_by_valu".

Did you mean: set_sort_by_value
2006 Mar 22
2
searching and sorting by date
...here we must return the first 50 most recent documents that match our query. We don't want the first 50 matches to the query that are then sorted by date. I hope the distinction is clear enough. What we are unsure of from reading the documents is if setting a sort value on our query (enq.set_sort_by_value()) will return the first 50 documents that match the query, or the first 50 matches, then sorted by that value. I've read a couple of the theads on sorting dates but I was unclear which approach would be needed to successfuly execute this kind of query. Any help from a kind xapian soul w...
2013 Mar 05
1
Sorting by value - direction
Hi, I'm trying to sort a list of results alphabetically, but it's coming out in the wrong direction. Indexing is done like this (PHP bindings): // Tag name as a value (for sorting) $doc->add_value(2, strtolower($obj->tag)); And searching like this: $enquire->set_sort_by_value(2); But for some reason, the results are coming out Z-A, not A-Z. I've tried setting true as the second argument to set_sort_by_value, even though we shouldn't need to reverse the direction because a standard sort should produce the right order already. But even setting the second argum...
2011 Aug 09
3
what is the fastest way to fetch results which are sorted by timestamp ?
what is the fastest way to fetch results which are sorted by timestamp ? i want to use xapian as my search engine , use add_boolean_term(something) and add_value(0,sortable_serialise(get_timestamp())) to a doc. search through enquire.set_weighting_scheme(xapian.BoolWeight()) and enquire.set_sort_by_value(0,True) to ensure that the results are sorted by the timestamp. This method is ok , but is there a faster way to do that ? Since i have millions of records .
2013 Feb 20
1
Sticky results
Hi there, I have a xapian index whose results are being sorted by a value, with (PHP bindings): $enquire->set_sort_by_value($sort_data_value); This is because I want the results returned in chronological order of publication date. However, I now have a need to have certain results be 'sticky' at the top of the resultset, regardless of their publication date. Obviously there are hacks such as setting a public...
2005 Jun 29
2
Sort by docid
...ages are indexed in chronological order) seems to be the simplest way to do so, but because I'm running a probabilistic query I don't think I can use Enquire::set_docid_order, since that will first sort by relevance and then by docid. I thought about adding the date as a value and then use set_sort_by_value, but I wonder about performance (the database contains about one million records). Any thoughts? Thanks, Marco
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__
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 s...
2006 May 10
2
ruby bindings odds and ends
...simply includes every method matching set_* or get_*). The ones I'm thinking of are those set_ methods which don't take exactly one parameter, and perhaps those get_ methods which take parameters. For example, Enquire::set_sort_by_relevance doesn't take any parameters, while Enquire::set_sort_by_value takes two (the second is optional, but it allows you to reverse the sort order which is a common thing to want to do). Neither of these methods is really a setter method in the usual sense. They're just methods with names which happen to start "set_". But I'm no Ruby programme...
2011 Mar 15
1
Changing order policy
Hi everybody, Maybe I'm going to ask a bit weird question: I have an item collection, most of them are writting with latin letters, but some of them have chinese letters. There is a list page and numbers, punctuation and chinese letters go first. I would like to change this order policy in order to show first items that start with latin letters, and then numbers, punctuation and chinese
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-co...
2018 Apr 03
0
sorting large msets
On Sat, Mar 31, 2018 at 12:58:19AM +0000, Eric Wong wrote: > Olly Betts <olly at survex.com> wrote: > > 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). > > Thanks, I can see how that helps. > > > But even 0.075 seconds doesn't r...
2014 Mar 26
3
about sort_by_value
Hello, I have found that the use of sort_by_value very slow. 16800 result, return to the previous 10, sorting takes about 25ms. And if you do not sort, returns 10, need only about 0.3ms. How to make the sort faster? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Mar 18
2
Xapian 1.0.11 released
...ever been correctly supported and overall it seems better to warn people than give incorrect results. However, this change means that existing applications will now fail visibly in some cases when they might have seemed to be working (but were actually returning wrong results). * Enquire::set_sort_by_value() (and similar methods) had an optional "ascending" parameter which defaulted to true. However, the interpretation of "ascending" was counter-intuitive: ascending=true would result in the reverse of the natural ordering. To deal with this while maintaining API and ABI...
2011 Aug 11
3
Fwd: Re: what is the fastest way to fetch results which are sorted by timestamp ?
...er to show most recent first. > > > > > i want to use xapian as my search engine , use > add_boolean_term(something) and > add_value(0,sortable_serialise(get_timestamp())) to a doc. > > > search through enquire.set_weighting_scheme(xapian.BoolWeight()) and > enquire.set_sort_by_value(0,True) to ensure that the results are sorted by > the timestamp. > > > > That's another approach, certainly. > > > > > This method is ok , but is there a faster way to do that ? Since i have > millions of records . > > > > Sorting the database, or...
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