[Xapian-discuss] Effects of passing a RSet to Enquire::get_mset()

Richard Boulton richard at lemurconsulting.com
Tue Jun 6 09:59:02 BST 2006


On Mon, Jun 05, 2006 at 11:37:14PM -0600, Rusty Conover wrote:
> From my brief testing it appears that passing an RSet filled with  
> documents to Enquire::get_mset() does not make much of a difference  
> to the returned results.

This is often the case.  The only effect that passing an RSet has in
get_mset() is to adjust the importance of the terms in the query.  If you
have a large query (eg, more than 10 terms), this can have a big effect on
the ranking on the documents.  However, if you have a small query, the
effect is very limited: in fact, if you have only 1 term in the query, the
weight of the term will be adjusted, but since all documents must already
match that term, the ranking will not change at all.

If you want to have a more pronounced effect, you need to expand the query,
and re-run an expanded one.  In other words, use get_eset() to get a set of
terms to add to the query (based on your supplied RSet), and then run
get_mset() using your initial query combined (with an OR operator) with the
additional terms.  You should still pass your RSet to the call to
get_mset() with the expanded query; it will have more effect in this
situation.

-- 
Richard



More information about the Xapian-discuss mailing list