On Wed, Dec 17, 2008 at 5:59 PM, Yann ROBIN <me.show at gmail.com>
wrote:> 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,
>
using OP_AND_MAYBE seems to work :)
Last question, how do we now "how much" weight is added to the
bm25weight ?
Thanks,
--
Yann