Displaying 2 results from an estimated 2 matches for "title_query".
2018 Aug 09
0
Boosted fields search in Python
...with python that looks a little like this:
# Some code that sets up the queryparser (stemming, for instance).
# See the getting started guide for a complete example.
# ...
# S = Subject. Note that you can't use a keyword argument for default_prefix, so we have
# to provide the flags as well.
title_query = queryparser.parse_query(querystring, xapian.QueryParser.FLAG_DEFAULT, "S")
Then you need to use OP_SCALE_WEIGHT, as you've identified, to apply the different weightings to the queries parsed against the two fields.
weighted_title_query = xapian.Query(xapian.Query.OP_SCALE_WEIGHT,...
2018 Aug 09
2
Boosted fields search in Python
Hi,
I'm using Xapian in Python2. I'm trying to replicate an analysis that
somebody else performed in Lucene. To do that I need to do a search for a
multi-word query in which particular fields are boosted - preferably at
query time. That is, given a query like "the cat is lying on the mat" (with
an OR operator, ignoring word positions but with stemming and stop words
removed),