SOLR-657: fix a bug which was accidentally introduced when r701485 was committed.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@719793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2008-11-22 02:51:22 +00:00
parent d5b7feddcc
commit e4e015758d
1 changed files with 2 additions and 3 deletions

View File

@ -71,9 +71,8 @@ class LuceneQParser extends QParser {
lparser.setDefaultOperator("AND".equals(opParam) ? QueryParser.Operator.AND : QueryParser.Operator.OR);
} else {
// try to get default operator from schema
String operator = getReq().getSchema().getSolrQueryParser(null).getField();
lparser.setDefaultOperator("AND".equals(operator) ?
QueryParser.Operator.AND : QueryParser.Operator.OR);
QueryParser.Operator operator = getReq().getSchema().getSolrQueryParser(null).getDefaultOperator();
lparser.setDefaultOperator(null == operator ? QueryParser.Operator.OR : operator);
}
return lparser.parse(qstr);