You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Visagan Nathan <vi...@gmail.com> on 2012/09/21 10:05:24 UTC
Custom Term matching
Hi,
I have requirement to do custom matching for specific search term if
included in the query. Is there any way to hook my custom function to do
the matching of certain terms. I can see parse method of QParser can be
used to formulate the TermQuery. But could not find the place where the
actual matching happens. Or could not attach a function reference to the
termQuery so that it will be called when matching happens instead of the
lucene/solr matching logic.
Thanks
Nathan
Re: Custom Term matching
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Great question. Right now there is no way beside of the copy-pasting
Boolean|Term Query/Weight/Scorer and hack the sources, that's make me
suffer so much quite often, btw.
Luceners, don't you think that adding kind of "mixing" framework into
Query/Scorer allows users to experiment with matching models easily? i.e.
how to make it possible that DisjunctionMaxQuery extends BooleanQuery ?
Regards
On Fri, Sep 21, 2012 at 12:05 PM, Visagan Nathan
<vi...@gmail.com>wrote:
> Hi,
>
> I have requirement to do custom matching for specific search term if
> included in the query. Is there any way to hook my custom function to do
> the matching of certain terms. I can see parse method of QParser can be
> used to formulate the TermQuery. But could not find the place where the
> actual matching happens. Or could not attach a function reference to the
> termQuery so that it will be called when matching happens instead of the
> lucene/solr matching logic.
>
> Thanks
> Nathan
>
>
>
--
Sincerely yours
Mikhail Khludnev
Tech Lead
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Custom Term matching
Posted by Visagan Nathan <vi...@gmail.com>.
Hi,
I have requirement to do custom matching for specific search term if
included in the query. Is there any way to hook my custom function to do
the matching of certain terms. I can see parse method of QParser can be
used to formulate the TermQuery. But could not find the place where the
actual matching happens. Or could not attach a function reference to the
termQuery so that it will be called when matching happens instead of the
lucene/solr matching logic.
Thanks
Nathan