mirror of https://github.com/apache/lucene.git
JavaCC generate the changes Doug has made
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@156443 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62855478e8
commit
4ed95e7f75
|
@ -8,6 +8,7 @@ import org.apache.lucene.index.Term;
|
||||||
import org.apache.lucene.analysis.*;
|
import org.apache.lucene.analysis.*;
|
||||||
import org.apache.lucene.document.*;
|
import org.apache.lucene.document.*;
|
||||||
import org.apache.lucene.search.*;
|
import org.apache.lucene.search.*;
|
||||||
|
import org.apache.lucene.util.Parameter;
|
||||||
|
|
||||||
public class QueryParserTokenManager implements QueryParserConstants
|
public class QueryParserTokenManager implements QueryParserConstants
|
||||||
{
|
{
|
||||||
|
|
|
@ -428,11 +428,31 @@ public class PrecedenceQueryParser implements PrecedenceQueryParserConstants {
|
||||||
* @exception ParseException throw in overridden method to disallow
|
* @exception ParseException throw in overridden method to disallow
|
||||||
*/
|
*/
|
||||||
protected Query getBooleanQuery(Vector clauses) throws ParseException
|
protected Query getBooleanQuery(Vector clauses) throws ParseException
|
||||||
|
{
|
||||||
|
return getBooleanQuery(clauses, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory method for generating query, given a set of clauses.
|
||||||
|
* By default creates a boolean query composed of clauses passed in.
|
||||||
|
*
|
||||||
|
* Can be overridden by extending classes, to modify query being
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
|
* @param clauses Vector that contains {@link BooleanClause} instances
|
||||||
|
* to join.
|
||||||
|
* @param disableCoord true if coord scoring should be disabled.
|
||||||
|
*
|
||||||
|
* @return Resulting {@link Query} object.
|
||||||
|
* @exception ParseException throw in overridden method to disallow
|
||||||
|
*/
|
||||||
|
protected Query getBooleanQuery(Vector clauses, boolean disableCoord)
|
||||||
|
throws ParseException
|
||||||
{
|
{
|
||||||
if (clauses == null || clauses.size() == 0)
|
if (clauses == null || clauses.size() == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
BooleanQuery query = new BooleanQuery();
|
BooleanQuery query = new BooleanQuery(disableCoord);
|
||||||
for (int i = 0; i < clauses.size(); i++) {
|
for (int i = 0; i < clauses.size(); i++) {
|
||||||
query.add((BooleanClause)clauses.elementAt(i));
|
query.add((BooleanClause)clauses.elementAt(i));
|
||||||
}
|
}
|
||||||
|
|
|
@ -451,8 +451,10 @@ public class PrecedenceQueryParser {
|
||||||
* @exception ParseException throw in overridden method to disallow
|
* @exception ParseException throw in overridden method to disallow
|
||||||
*/
|
*/
|
||||||
protected Query getBooleanQuery(Vector clauses) throws ParseException
|
protected Query getBooleanQuery(Vector clauses) throws ParseException
|
||||||
getBooleanQuery(clauses, false);
|
{
|
||||||
|
return getBooleanQuery(clauses, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory method for generating query, given a set of clauses.
|
* Factory method for generating query, given a set of clauses.
|
||||||
* By default creates a boolean query composed of clauses passed in.
|
* By default creates a boolean query composed of clauses passed in.
|
||||||
|
|
Loading…
Reference in New Issue