You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Joshua Sumali <js...@kobo.com> on 2012/04/01 06:14:38 UTC

Determining individual Field matches within a SolrRequestHandler or SearchComponent

Hi,

Is it possible to easily and programmatically determine whether one or more solr fields were a successful match within a SolrRequestHandler or SearchComponent?

The DebugComponent provides similar text output when debugging/explaining a query:

                8.249506 = (MATCH) fieldWeight(attribution_en:leigh in 2313441)

Class org.apache.lucene.search.Explanation has an isMatch() - is there anything similar, but on a per-field basis?

I've dug through the solr and lucene source a bit, and it doesn't seem like this is available anywhere.

If this is the case, what's my next best option? Comparing the query text to the field(s) in question?

Thanks,
Josh