public VisualWordsImageSearcher(int numMaxHits, String fieldName) { this.numMaxHits = numMaxHits; this.fieldName = fieldName; qp = new QueryParser(fieldName, new WhitespaceAnalyzer()); BooleanQuery.setMaxClauseCount(10000); }
public VisualWordsImageSearcher(int numMaxHits, String fieldName) { this.numMaxHits = numMaxHits; this.fieldName = fieldName; qp = new QueryParser(fieldName, new WhitespaceAnalyzer()); BooleanQuery.setMaxClauseCount(10000); }
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); }
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); }
/** * 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); }
/** * Sets lucene boolean query max clause count. * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { BooleanQuery.setMaxClauseCount(maxClauseCount); }
/** * 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); }
public void setBooleanQueryMaxClause(int max) { BooleanQuery.setMaxClauseCount(max); }
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); } } }
/** * 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); }
/** * 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); } }
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); }
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); } }
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); } }
public Searcher(IndexReader reader){ BooleanQuery.setMaxClauseCount(maxClauseCount); setIndexReader(reader); setIndexSearcher(); }
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); }
public Searcher(String indexPath){ BooleanQuery.setMaxClauseCount(maxClauseCount); setIndexReader(getIndex(indexPath)); setIndexSearcher(); }
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); }
@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()))); }
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));