mirror of https://github.com/apache/lucene.git
small code simplification suggested by John Wang; added deprecated tag to javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@202282 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
52cda0c4ef
commit
efc2367ac6
|
@ -70,16 +70,12 @@ public class MultiFieldQueryParser extends QueryParser
|
||||||
return super.getFieldQuery(field, queryText);
|
return super.getFieldQuery(field, queryText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use {@link #getFieldQuery(String, String)}
|
||||||
|
*/
|
||||||
protected Query getFieldQuery(String field, Analyzer analyzer, String queryText)
|
protected Query getFieldQuery(String field, Analyzer analyzer, String queryText)
|
||||||
throws ParseException {
|
throws ParseException {
|
||||||
if (field == null) {
|
return getFieldQuery(field, queryText);
|
||||||
Vector clauses = new Vector();
|
|
||||||
for (int i = 0; i < fields.length; i++)
|
|
||||||
clauses.add(new BooleanClause(super.getFieldQuery(fields[i], queryText),
|
|
||||||
BooleanClause.Occur.SHOULD));
|
|
||||||
return getBooleanQuery(clauses, true);
|
|
||||||
}
|
|
||||||
return super.getFieldQuery(field, queryText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue