On Aug 11, 2009, at 5:30 PM, Bill Au wrote:
It looks like things have changed a bit since this subject was last
brought
up here. I see that there are support in Solr/Lucene for indexing
payload
data (DelimitedPayloadTokenFilterFactory and
DelimitedPayloadTokenFilter).
Overriding the Similarity class is straight forward. So the last
piece of
the puzzle is to use a BoostingTermQuery when searching. I think
all I need
to do is to subclass Solr's LuceneQParserPlugin uses SolrQueryParser
under
the cover. I think all I need to do is to write my own query parser
plugin
that uses a custom query parser, with the only difference being in the
getFieldQuery() method where a BoostingTermQuery is used instead of a
TermQuery.
The BTQ is now deprecated in favor of the BoostingFunctionTermQuery,
which gives some more flexibility in terms of how the spans in a
single document are scored.
Am I on the right track?
Yes.
Has anyone done something like this already?
I intend to, but haven't started.
Since Solr already has indexing support for payload, I was hoping
that query
support is already in the works if not available already. If not, I
am
willing to contribute but will probably need some guidance since my
knowledge in Solr query parser is weak.
https://issues.apache.org/jira/browse/SOLR-1337