Dear All,

I have a requirement to highlight a field only when all keywords entered
match. This also needs to support phrase, operator or wildcard queries.
I'm using Solr 4.0 with edismax because the search needs to be carried out
on multiple fields.
I know with highlighting feature I can configure a field to indicate a
match, however I do not find a setting to highlight only if all keywords
match. That makes me think is that the right approach to take? Can you
please guide me in right direction?

The edsimax config looks like below:

<requestHandler name="assdismax" class="solr.SearchHandler">
<lst name="defaults">
<str name="defType">edismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">title^10 description^5 annotations^3 notes^2 categories</str>
<str name="pf">title</str>
<int name="ps">0</int>
<str name="q.alt">*:*</str>
<str name="fl">*,score</str>
<str name="mm">100%</str>
<str name="q.op">AND</str>
<str name="sort">score desc</str>
<str name="facet">true</str>
<str name="facet.limit">-1</str>
<str name="facet.mincount">1</str>
<str name="facet.field">uniq_subtype_id</str>
<str name="facet.field">component_type</str>
<str name="facet.field">genre_type</str>
</lst>
<lst name="appends">
<str name="fq">collection:assets</str>
</lst>
</requestHandler>

If I search for 'countryside number 10' as the keyword then highlight only
if the 'annotations' contain all these entered search terms. Any document
containing just one or two terms is not a match.

Thanks,
Sandeep
(p.s: I haven't enabled the highlighting feature yet on this config and
will be doing so only if that will fulfil the requirement I have mentioned
above.)

Reply via email to