[Xapian-discuss] using ValueWeightPostingSource

Yann ROBIN me.show at gmail.com
Wed Dec 17 16:59:32 GMT 2008


Hi,

I'm currently using PostingSource to add some weight over the result
using a value.

I didn't find any documentation on how to use it with the query so i
link a query constructed using the posting source and a query made
using the query parser with an AND operator :

Xapian.Query queryText = parser.ParseQuery("test:" + textBox1.Text + "
DS:1 DS:2");
Xapian.Query postingQuery = new Xapian.Query(new
Xapian.ValueWeightPostingSource(database, (uint)ValueField.BestSell));
Xapian.Query query = new Xapian.Query(Xapian.Query.op.OP_AND,
queryText, postingQuery);

My first question is : Is this the right way to make the query ?
And my second :

My problem now is that it returns only document which has a "bestsell
value" set.
Do i have to change something in the ValueWeightPostingSource so it
will treat document without "bestsell value" set ?

Thanks,

-- 
Yann



More information about the Xapian-discuss mailing list