本文整理了Java中org.apache.lucene.search.BooleanQuery.setMaxClauseCount()
方法的一些代码示例,展示了BooleanQuery.setMaxClauseCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BooleanQuery.setMaxClauseCount()
方法的具体详情如下:
包路径:org.apache.lucene.search.BooleanQuery
类名称:BooleanQuery
方法名:setMaxClauseCount
[英]Set the maximum number of clauses permitted per BooleanQuery. Default value is 1024.
[中]设置每个布尔查询允许的最大子句数。默认值为1024。
代码示例来源:origin: dermotte/LIRE
public VisualWordsImageSearcher(int numMaxHits, String fieldName) {
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(fieldName, new WhitespaceAnalyzer());
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: dermotte/LIRE
public VisualWordsImageSearcher(int numMaxHits, String fieldName) {
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(fieldName, new WhitespaceAnalyzer());
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: dermotte/LIRE
public VisualWordsImageSearcher(int numMaxHits, Similarity similarity, String fieldName) {
this.similarity = similarity;
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(fieldName, new WhitespaceAnalyzer());
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: dermotte/LIRE
public VisualWordsImageSearcher(int numMaxHits, Similarity similarity, String fieldName) {
this.similarity = similarity;
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(fieldName, new WhitespaceAnalyzer());
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: org.alfresco/alfresco-repository
/**
* Set the max number of queries in a llucen boolean query
*
* @param queryMaxClauses int
*/
@Override
public void setQueryMaxClauses(int queryMaxClauses)
{
this.queryMaxClauses = queryMaxClauses;
BooleanQuery.setMaxClauseCount(this.queryMaxClauses);
}
代码示例来源:origin: com.isotrol.impe3/impe3-es-web20-server
/**
* Sets lucene boolean query max clause count.
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
public void afterPropertiesSet() throws Exception {
BooleanQuery.setMaxClauseCount(maxClauseCount);
}
代码示例来源:origin: Alfresco/alfresco-repository
/**
* Set the max number of queries in a llucen boolean query
*
* @param queryMaxClauses int
*/
@Override
public void setQueryMaxClauses(int queryMaxClauses)
{
this.queryMaxClauses = queryMaxClauses;
BooleanQuery.setMaxClauseCount(this.queryMaxClauses);
}
代码示例来源:origin: com.atlassian.bonnie/atlassian-bonnie
public void setBooleanQueryMaxClause(int max)
{
BooleanQuery.setMaxClauseCount(max);
}
代码示例来源:origin: org.dspace.dependencies.solr/dspace-solr-core
void booleanQueryMaxClauseCount() {
synchronized(SolrCore.class) {
if (boolean_query_max_clause_count == Integer.MIN_VALUE) {
boolean_query_max_clause_count = solrConfig.booleanQueryMaxClauseCount;
BooleanQuery.setMaxClauseCount(boolean_query_max_clause_count);
} else if (boolean_query_max_clause_count != solrConfig.booleanQueryMaxClauseCount ) {
log.debug("BooleanQuery.maxClauseCount= " +boolean_query_max_clause_count+ ", ignoring " +solrConfig.booleanQueryMaxClauseCount);
}
}
}
代码示例来源:origin: com.isotrol.impe3/impe3-es-oi-server
/**
* Sets lucene boolean query max clause count.
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
public void afterPropertiesSet() throws Exception {
queryable = Queryables.simple(store);
BooleanQuery.setMaxClauseCount(maxClauseCount);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
/**
* BooleanQuery has a static (but reconfigurable) limit for the number of clauses.
* If any node was able to bypass this limit, we'll need to assume that this limit
* was somehow relaxed and some point in time, so we need to apply the same configuration
* to this node.
*
* @param numberOfClauses The number of clauses being deserialized
*/
private static void assureNumberOfClausesLimit(int numberOfClauses) {
final int maxClauseLimit = BooleanQuery.getMaxClauseCount();
if (numberOfClauses>maxClauseLimit) {
BooleanQuery.setMaxClauseCount(numberOfClauses);
}
}
代码示例来源:origin: ch.epfl.bbp.nlp/bluima_text2pmid
public Txt2PubmedId(File indexPath) throws IOException {
Directory dir = FSDirectory.open(indexPath);
indexReader = DirectoryReader.open(dir);
searcher = new IndexSearcher(indexReader);
Analyzer analyzer = Txt2PubmedIdIndexer.getAnalyzer();
parser = new QueryParser(LUCENE_41, CONTENT_FIELD, analyzer);
BooleanQuery.setMaxClauseCount(MAX_VALUE);
}
代码示例来源:origin: apache/jackrabbit-oak
private void configureBooleanClauseLimit(Map<String, ?> config) {
int booleanClauseLimit = PropertiesUtil.toInteger(config.get(PROP_BOOLEAN_CLAUSE_LIMIT),
PROP_BOOLEAN_CLAUSE_LIMIT_DEFAULT);
if (booleanClauseLimit != BooleanQuery.getMaxClauseCount()){
BooleanQuery.setMaxClauseCount(booleanClauseLimit);
log.info("Changed the Max boolean clause limit to {}", booleanClauseLimit);
}
}
代码示例来源:origin: org.apache.jackrabbit/oak-lucene
private void configureBooleanClauseLimit(Map<String, ?> config) {
int booleanClauseLimit = PropertiesUtil.toInteger(config.get(PROP_BOOLEAN_CLAUSE_LIMIT),
PROP_BOOLEAN_CLAUSE_LIMIT_DEFAULT);
if (booleanClauseLimit != BooleanQuery.getMaxClauseCount()){
BooleanQuery.setMaxClauseCount(booleanClauseLimit);
log.info("Changed the Max boolean clause limit to {}", booleanClauseLimit);
}
}
代码示例来源:origin: com.github.monnetproject/clesa
public Searcher(IndexReader reader){
BooleanQuery.setMaxClauseCount(maxClauseCount);
setIndexReader(reader);
setIndexSearcher();
}
代码示例来源:origin: com.github.kzwang/lire
public VisualWordsImageSearcher(int numMaxHits, Similarity similarity, String fieldName) {
this.similarity = similarity;
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(LuceneUtils.LUCENE_VERSION, fieldName, new WhitespaceAnalyzer(LuceneUtils.LUCENE_VERSION));
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: com.github.monnetproject/clesa
public Searcher(String indexPath){
BooleanQuery.setMaxClauseCount(maxClauseCount);
setIndexReader(getIndex(indexPath));
setIndexSearcher();
}
代码示例来源:origin: com.github.kzwang/lire
public VisualWordsImageSearcher(int numMaxHits, String fieldName) {
this.numMaxHits = numMaxHits;
this.fieldName = fieldName;
qp = new QueryParser(LuceneUtils.LUCENE_VERSION, fieldName, new WhitespaceAnalyzer(LuceneUtils.LUCENE_VERSION));
BooleanQuery.setMaxClauseCount(10000);
}
代码示例来源:origin: harbby/presto-connectors
@Inject
public BoolQueryParser(Settings settings) {
BooleanQuery.setMaxClauseCount(settings.getAsInt("index.query.bool.max_clause_count", settings.getAsInt("indices.query.bool.max_clause_count", BooleanQuery.getMaxClauseCount())));
}
代码示例来源:origin: org.elasticsearch/elasticsearch
registerQuery(new QuerySpec<>(QueryStringQueryBuilder.NAME, QueryStringQueryBuilder::new, QueryStringQueryBuilder::fromXContent));
registerQuery(new QuerySpec<>(BoostingQueryBuilder.NAME, BoostingQueryBuilder::new, BoostingQueryBuilder::fromXContent));
BooleanQuery.setMaxClauseCount(INDICES_MAX_CLAUSE_COUNT_SETTING.get(settings));
registerQuery(new QuerySpec<>(BoolQueryBuilder.NAME, BoolQueryBuilder::new, BoolQueryBuilder::fromXContent));
registerQuery(new QuerySpec<>(TermQueryBuilder.NAME, TermQueryBuilder::new, TermQueryBuilder::fromXContent));
内容来源于网络,如有侵权,请联系作者删除!