[Xapian-discuss] indexing and sorting by value in python
mark
markkicks at gmail.com
Sat Aug 16 14:37:53 BST 2008
On Sat, Aug 16, 2008 at 1:35 AM, Matteo Zandi <matteo.zandi at gmail.com> wrote:
> On Sat, Aug 16, 2008 at 4:51 AM, mark <markkicks at gmail.com> wrote:
>> doc.add_value(0, Xapian::sortable_serialise(price));
> I have documents in different languages, what I do is:
>
> doc.add_value(0, lang)
>> when I am searching, how do i specify these sorting properties?
> then I AND two queries
> query1 = query = xapian.Query(query_string)
> query2 = xapian.Query(xapian.Query.OP_VALUE_RANGE, 0, lang, lang)
> query = xapian.Query(xapian.Query.OP_AND, query1, query2)
thanks a lot for the explanation.
but this would only give results only for lang 'en' or 'it' right? how
would i get results with both 'en' and 'it' but sorted by the lang
value?
thanks a lot!
More information about the Xapian-discuss
mailing list