Hi, Is there any way to sort by a value, then by relevance, then by another value? I was unable to find a way to do this. We're using the Perl interface. Thanks! Jim
Hi all, I know a good while ago some code was floating around to create an n-gram query parser. I'm just wondering if there are any current plans for something like that to find its way into Xapian proper ? We're currently pre-generating a load of grams before pushing them into a Xapian database, but increasingly we're starting to use custom boolean prefixes. Having a native n-gram query parser would be fab. Best, tom http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
On Mon, Jul 20, 2009 at 04:49:48PM -0400, Jim Spath wrote:> Is there any way to sort by a value, then by relevance, then by another > value? I was unable to find a way to do this.There isn't. When I was writing Xapian::Sorter, I contemplated passing it the document relevance weight to allow this, but that would mean we'd have to always calculate the weight before calling the Sorter (currently we delay doing so until we need it, which we often don't at this point) or have an "I use the weight" method on Sorter which you could use to get passed the weight. If you were passed the weight, you could use sortable_serialise() to build it into the generated key But since I didn't actually have a scenario where this would be useful, I avoided over-complicating things. How are you hoping to use it? Cheers, Olly