[Xapian-discuss] Relevance, weighting and searching by specifically weighted text

Justin Finkelstein justin at redwiredesign.com
Wed Jun 1 12:46:00 BST 2011


Richard

Thanks for the link; I've had a look at this and have a couple more
questions regarding implementation:

    1. If we're applying a weight to the sub-query in question, it looks
like that will just increase the weight of the query - not restrict the
query to terms that have already had a weight applied. Is this correct?

    2. It looks to me like term prefixing may not be effective as we
have multiple words (terms?) within the titles of our products; so would
we need to split the titles into separate words, prefix and index these?
In addition, would we be able to search effectively on these prefixed
terms? My experience with term prefixing so far has been to use it for
individual attributes of products, such as 'type', 'country' and so on,
where we'd match terms on a one-by-one basis..

Can you shed any light on these?

Thanks,

Justin

On Wed, 2011-06-01 at 12:14 +0100, Richard Boulton wrote:

> On 1 June 2011 11:06, Justin Finkelstein
> > I've been asked if it's possible to narrow queries to just a particular
> > field (translating into fields with a specific weight) within the index.
> > I've had a look at the reference for the
> > Xapian_Enquire::set_weighting_scheme method and cannot see a way where
> > altering the parameters of the BM25 weighting scheme can achieve this.
> >
> > Is there a way this can be done?
> 
> Yes, there is.  You need to index each field you want to be able to
> search (or weight) individually, with a unique prefix.  Then, see
> http://trac.xapian.org/wiki/FAQ/ExtraWeight
> 





More information about the Xapian-discuss mailing list