From efc2367ac688a130cd459dccc21716320b8edfaa Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Tue, 28 Jun 2005 21:18:51 +0000 Subject: [PATCH] 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 --- .../lucene/queryParser/MultiFieldQueryParser.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java b/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java index 56ada416a21..57b7a39967d 100644 --- a/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java +++ b/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java @@ -70,16 +70,12 @@ public class MultiFieldQueryParser extends QueryParser return super.getFieldQuery(field, queryText); } + /** + * @deprecated use {@link #getFieldQuery(String, String)} + */ protected Query getFieldQuery(String field, Analyzer analyzer, String queryText) throws ParseException { - if (field == null) { - 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); + return getFieldQuery(field, queryText); } /**