Hi, I'm trying to understand what's going on with
the combination of:

* Solr 8.1.1
* edismax parser
* qf with multiple fields specified (each of which has type
  text_en_splitting, some of which are multiValued)
* unified highlight method
* query with two terms
* results where the two terms match against _separate_ fields

when I make both of the two query terms _required_.

(Sample values for the query parameters to start with:
"q":"scope national"
"fl":"id,last_updated,slug,status,title,acronym,publisher,description,widgetable,sissvoc_endpoint,owner,[explain]"
"defType":"edismax"
"qf":"title_search^1 subject_search^0.5 description^0.01 concept_search^0.5 
publisher_search^0.5"
"hl":"on"
"hl.fl":"*"
"hl.method":"unified"
"hl.snippets":"10"
)

So far, so good: results are correct, and highlighting is correct.
In particular, for a result in which there is a match
for "scope" in one field (concept_search) and for "national"
in another (publisher_search), I get a highlighting result for
"scope" in concept_search and for "national" in publisher_search.
(I also get a highlight for another field concept_phrase which
has the same content as concept_search but with string type.)

All good so far.

But now if I change the query from

"q":"scope national"

to

"q":"+scope +national"

my results still (correctly) include the result in which there
was a match for "scope" in one field (concept_search) and for "national"
in another (publisher_search), but now there are no _highlights_
for that result!

What is even more counterintuitive is that if I now also set
"hl.requireFieldMatch":"true"
the highlights for the concept_search and publisher_search fields
(but not the concept_phrase field) come back!

Richard.

Reply via email to