Hi all,
I'm having some trouble wrapping my head around boosting
StandardQueries. It looks like the function: query(subquery, default)
<http://wiki.apache.org/solr/FunctionQuery#query> is what I want, but
the examples seem to focus on just returning a score (e.g. product of
popularity and the score of the subquery). I assume my difficulty stems
from the fact that I'd like to retrieve highlighting from one query, but
impact score and 'relevance' by a different (sub)query.
Example:
q=content:(roi "return on investment" "return investment"~5)
fq=extension:(pdf doc)
boost=keywords:(financial investment profit loss) title:(financial
investment profit loss) url:(investment investor relations phoenix)
So what I would like is to highlight the items in the query (e.g.
'roi' 'return on investment'...) while _not_ highlighting the boosting
terms (e.g. financial, investment, profit, loss). However, those
documents with matches for the boost query would be ranked higher than
those not matching.
Is there some existing way to do this? I'd like to keep the power
of the standard queries (i.e. not dismax), and still get results that
don't match the boost query (i.e. not using a filterquery) while having
an arbitrary subquery impact the score of the main query while getting
highlighting for only the main query. Obvious, right? :-) Any thoughts
or pointers most welcome.
Thanks,
Sean