dsmiley commented on a change in pull request #780: SOLR-11866: Support 
efficient subset matching in query elevation rules
URL: https://github.com/apache/lucene-solr/pull/780#discussion_r303721826
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
 ##########
 @@ -1131,4 +1227,333 @@ public int compareTop(int doc) {
       };
     }
   }
+
+  /**
+   * Matches a collection of subsets of type <E>.
+   * <p>
+   * Given a collection of subsets <code>N</code>, finds all the subsets that 
are contained (ignoring duplicate elements)
+   * by a provided set <code>s</code>.
+   * That is, finds all subsets <code>n</code> in <code>N</code> for which 
<code>s.containsAll(n)</code>
+   * (<code>s</code> contains all the elements of <code>n</code>, in any 
order).
+   * <p>
+   * Associates a match value of type &lt;M&gt; to each subset and provides it 
each time the subset matches (i.e. is
+   * contained by the provided set).
+   *
+   * @param <E> Subset element type.
+   * @param <M> Subset match value type.
+   */
+  protected interface SubsetMatcher<E, M> {
 
 Review comment:
   I don't think there's a point to this interface (with builder) as separate 
from implementation since there is one and it's highly theoretical to imagine 
another user provided one.  So lets combine this with the implementation below, 
keeping the javadocs.  I suppose the name TrieSubsetMatcher is nicest to me but 
I don't care.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to