diff --git a/src/java/org/apache/lucene/search/PhrasePrefixQuery.java b/src/java/org/apache/lucene/search/PhrasePrefixQuery.java index c2d81e346be..66c08c90c40 100644 --- a/src/java/org/apache/lucene/search/PhrasePrefixQuery.java +++ b/src/java/org/apache/lucene/search/PhrasePrefixQuery.java @@ -66,11 +66,11 @@ public class PhrasePrefixQuery extends Query { * @see PhraseQuery#add(Term) */ public void add(Term[] terms) { - int position = 0; - if(positions.size() > 0) - position = ((Integer) positions.lastElement()).intValue() + 1; - - add(terms, position); + int position = 0; + if (positions.size() > 0) + position = ((Integer) positions.lastElement()).intValue() + 1; + + add(terms, position); } /** @@ -81,29 +81,29 @@ public class PhrasePrefixQuery extends Query { * @param position */ public void add(Term[] terms, int position) { - if (termArrays.size() == 0) - field = terms[0].field(); - - for (int i=0; i