You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/09 13:22:39 UTC

[GitHub] [lucene] dweiss commented on a change in pull request #668: LUCENE-10414: Add fn:fuzzyTerm interval function to flexible query parser

dweiss commented on a change in pull request #668:
URL: https://github.com/apache/lucene/pull/668#discussion_r802653003



##########
File path: lucene/queries/src/java/org/apache/lucene/queries/intervals/Intervals.java
##########
@@ -48,6 +48,14 @@
  * {@link #or(boolean, IntervalsSource...)} factory method to prevent rewriting.
  */
 public final class Intervals {
+  /**
+   * The default number of expansions in:
+   *
+   * <ul>
+   *   <li>{@link #multiterm(CompiledAutomaton, String)}
+   * </ul>
+   */
+  public static final int DEFAULT_MAX_EXPANSIONS = 128;
 

Review comment:
       I've extracted this as a constant. It's functionally the same but it's good to have a reference to the defaults that you can rely on in external code (other than javadoc just mentioning it).

##########
File path: lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/intervalfn/Wildcard.java
##########
@@ -25,18 +25,28 @@
 /** Node that represents {@link Intervals#wildcard(BytesRef)}. */
 public class Wildcard extends IntervalFunction {
   private final String wildcard;
+  private final int maxExpansions;
 
-  public Wildcard(String wildcard) {
+  public Wildcard(String wildcard, int maxExpansions) {

Review comment:
       This commit piggybacks an additional parameter maxExpansions to fn:wildcard function.

##########
File path: lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
##########
@@ -144,7 +144,7 @@ public ScoreMode scoreMode() {
   }
 
   /**
-   * Tests that a query matches the an expected set of documents using Hits.

Review comment:
       This is just a test code cleanup. I changed the requested hits count to be twice the requested size (and not an arbitrary 1000) and used smaller iterators in the code.




-- 
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-unsubscribe@lucene.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org