本文整理匯總了Java中org.apache.lucene.search.BooleanQuery.getMaxClauseCount方法的典型用法代碼示例。如果您正苦於以下問題:Java BooleanQuery.getMaxClauseCount方法的具體用法?Java BooleanQuery.getMaxClauseCount怎麽用?Java BooleanQuery.getMaxClauseCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.lucene.search.BooleanQuery
的用法示例。
在下文中一共展示了BooleanQuery.getMaxClauseCount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: build
import org.apache.lucene.search.BooleanQuery; //導入方法依賴的package包/類
@Override
public BooleanQuery build(QueryNode queryNode) throws QueryNodeException {
StandardBooleanQueryNode booleanNode = (StandardBooleanQueryNode) queryNode;
BooleanQuery bQuery = new BooleanQuery(booleanNode.isDisableCoord());
List<QueryNode> children = booleanNode.getChildren();
if (children != null) {
for (QueryNode child : children) {
Object obj = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
if (obj != null) {
Query query = (Query) obj;
try {
bQuery.add(query, getModifierValue(child));
} catch (TooManyClauses ex) {
throw new QueryNodeException(new MessageImpl(
QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, BooleanQuery
.getMaxClauseCount(), queryNode
.toQueryString(new EscapeQuerySyntaxImpl())), ex);
}
}
}
}
return bQuery;
}
示例2: build
import org.apache.lucene.search.BooleanQuery; //導入方法依賴的package包/類
@Override
public BooleanQuery build(QueryNode queryNode) throws QueryNodeException {
BooleanQueryNode booleanNode = (BooleanQueryNode) queryNode;
BooleanQuery bQuery = new BooleanQuery();
List<QueryNode> children = booleanNode.getChildren();
if (children != null) {
for (QueryNode child : children) {
Object obj = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
if (obj != null) {
Query query = (Query) obj;
try {
bQuery.add(query, getModifierValue(child));
} catch (TooManyClauses ex) {
throw new QueryNodeException(new MessageImpl(
QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, BooleanQuery
.getMaxClauseCount(), queryNode
.toQueryString(new EscapeQuerySyntaxImpl())), ex);
}
}
}
}
return bQuery;
}