lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <uschind...@apache.org>
Subject RE: how to use CachingWrapperFilter correctly and effectively in Lucene
Date Wed, 11 Mar 2015 19:29:06 GMT
Hi,

This question is about Lucene.NET, which is not part of the Apache Lucene project. Please
send your questions to the Lucene.NET mailing list: user@lucenenet.apache.org

Uwe

-----
Uwe Schindler
uschindler@apache.org 
Apache Lucene PMC Member / Committer
Bremen, Germany
http://lucene.apache.org/

> -----Original Message-----
> From: doglin82 [mailto:karen.lin@bellmedia.ca]
> Sent: Wednesday, March 11, 2015 8:23 PM
> To: general@lucene.apache.org
> Subject: how to use CachingWrapperFilter correctly and effectively in Lucene
> 
> We are using Lucene for our web site and as the index grew, we got the
> following exception due to too many clause.
> 
> the Message: maxClauseCount is set to 1024 Stack Trace:
> at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause) at So I did
> some research and added a CachingWrapperFilter , my code now looks like
> this
> 
> BooleanQuery bq = new BooleanQuery();
> 
> //publishedQuery is set to BooleanQuery
>     bq.Add(publishedQuery, BooleanClause.Occur.MUST);
> 
>  var sortBy = customSort ?? new Sort(Sort.RELEVANCE.GetSort());
>             BooleanQuery.SetMaxClauseCount(4096);
> 
>            Filter filter = new QueryFilter(bq);
>             CachingWrapperFilter cachingFilter = new CachingWrapperFilter(filter);
> 
>             var results = _searcher.Search(bq, cachingFilter,sortBy); I want to know
> 1) If I am using the CachingWrapperFilter correct and effectively
> 2) Do I still need to set the Max Clause to 4096 if I am using CachingWrapper
> Filter, default is 1024 for max clause count
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-
> use-CachingWrapperFilter-correctly-and-effectively-in-Lucene-
> tp4192491.html
> Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message