From bc4581f6d94db3630a09e4d8882e2a675b129c49 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sun, 8 Jan 2006 22:35:52 +0000 Subject: [PATCH] set default phraseSlop on MultiPhraseQuery in getFieldQuery: LUCENE-483 git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@367110 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/queryParser/QueryParser.java | 1 + src/java/org/apache/lucene/queryParser/QueryParser.jj | 1 + 2 files changed, 2 insertions(+) diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.java b/src/java/org/apache/lucene/queryParser/QueryParser.java index f3119a2497a..687b95aa740 100644 --- a/src/java/org/apache/lucene/queryParser/QueryParser.java +++ b/src/java/org/apache/lucene/queryParser/QueryParser.java @@ -414,6 +414,7 @@ public class QueryParser implements QueryParserConstants { else { // phrase query: MultiPhraseQuery mpq = new MultiPhraseQuery(); + mpq.setSlop(phraseSlop); List multiTerms = new ArrayList(); for (int i = 0; i < v.size(); i++) { t = (org.apache.lucene.analysis.Token) v.elementAt(i); diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.jj b/src/java/org/apache/lucene/queryParser/QueryParser.jj index 3d8fd29cbb1..92c6e1e66e0 100644 --- a/src/java/org/apache/lucene/queryParser/QueryParser.jj +++ b/src/java/org/apache/lucene/queryParser/QueryParser.jj @@ -437,6 +437,7 @@ public class QueryParser { else { // phrase query: MultiPhraseQuery mpq = new MultiPhraseQuery(); + mpq.setSlop(phraseSlop); List multiTerms = new ArrayList(); for (int i = 0; i < v.size(); i++) { t = (org.apache.lucene.analysis.Token) v.elementAt(i);