cpoerschke commented on a change in pull request #757:
URL: https://github.com/apache/solr/pull/757#discussion_r837306552



##########
File path: 
solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java
##########
@@ -431,14 +435,33 @@ protected Locale parseLocale(String language, String 
country, String variant) {
 
     @Override
     protected Predicate<String> getFieldMatcher(String field) {
-      // TODO define hl.queryFieldPattern as a more advanced alternative to 
hl.requireFieldMatch.
 
       // note that the UH at Lucene level default to effectively "true"
       if (params.getFieldBool(field, HighlightParams.FIELD_MATCH, false)) {
         return field::equals; // requireFieldMatch
-      } else {
-        return NOT_REQUIRED_FIELD_MATCH_PREDICATE;
       }
+
+      String[] queryFieldPattern =
+          params.getFieldParams(field, HighlightParams.QUERY_FIELD_PATTERN);
+      if (queryFieldPattern != null && queryFieldPattern.length != 0) {
+
+        Collection<String> indexedFields = 
solrIndexSearcher.getDocFetcher().getIndexedFieldNames();
+
+        Predicate<String> predicate = null;
+        for (String f : expandWildcardsInHighlightFields(indexedFields, 
queryFieldPattern)) {

Review comment:
       Fair point. 
https://github.com/apache/solr/pull/767/commits/d48a4a623ef5f50f13315314690bad9652b154be
 on #767 to drop the "stored" and "highlight" from the argument name (and to 
add "supplier") plus also to omit "highlight" from the method name since 
actually there's nothing highlighting specific about the expansion and the 
class name already indicates highlighting scope.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to