You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by doglin82 <ka...@bellmedia.ca> on 2015/03/11 16:21:24 UTC

If I put a cached filter, do i still need to set the max clause count?

We are using Lucene for our web site and as the index grew, we got the
following exception.

the Message: maxClauseCount is set to 1024
Stack Trace: 
at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause)
at Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur)
Instead of using Range Query, I am using a Range Filter now, and wrapped it
with a Cached Filter,

  RangeFilter dateFilter = new RangeFilter("documentpublishfrom",
"20000101000000", DateTime.Now.AddYears(10).ToString("yyyyMMddHHmmss"),
true, true);


  CachingWrapperFilter cachingFilter = new CachingWrapperFilter(dateFilter
);


    var results = _searcher.Search(bq, cachingFilter, sortBy);
So, now that I am using filters intsead, do i need to set max clause count
still? Please advise



--
View this message in context: http://lucene.472066.n3.nabble.com/If-I-put-a-cached-filter-do-i-still-need-to-set-the-max-clause-count-tp4192413.html
Sent from the Lucene - General mailing list archive at Nabble.com.

RE: If I put a cached filter, do i still need to set the max clause count?

Posted by Uwe Schindler <us...@apache.org>.
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 4:21 PM
> To: general@lucene.apache.org
> Subject: If I put a cached filter, do i still need to set the max clause count?
> 
> We are using Lucene for our web site and as the index grew, we got the
> following exception.
> 
> the Message: maxClauseCount is set to 1024 Stack Trace:
> at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause) at
> Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur) Instead of
> using Range Query, I am using a Range Filter now, and wrapped it with a
> Cached Filter,
> 
>   RangeFilter dateFilter = new RangeFilter("documentpublishfrom",
> "20000101000000",
> DateTime.Now.AddYears(10).ToString("yyyyMMddHHmmss"),
> true, true);
> 
> 
>   CachingWrapperFilter cachingFilter = new CachingWrapperFilter(dateFilter );
> 
> 
>     var results = _searcher.Search(bq, cachingFilter, sortBy); So, now that I am
> using filters intsead, do i need to set max clause count still? Please advise
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/If-I-put-
> a-cached-filter-do-i-still-need-to-set-the-max-clause-count-tp4192413.html
> Sent from the Lucene - General mailing list archive at Nabble.com.


RE: If I put a cached filter, do i still need to set the max clause count?

Posted by Uwe Schindler <us...@apache.org>.
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 4:21 PM
> To: general@lucene.apache.org
> Subject: If I put a cached filter, do i still need to set the max clause count?
> 
> We are using Lucene for our web site and as the index grew, we got the
> following exception.
> 
> the Message: maxClauseCount is set to 1024 Stack Trace:
> at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause) at
> Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur) Instead of
> using Range Query, I am using a Range Filter now, and wrapped it with a
> Cached Filter,
> 
>   RangeFilter dateFilter = new RangeFilter("documentpublishfrom",
> "20000101000000",
> DateTime.Now.AddYears(10).ToString("yyyyMMddHHmmss"),
> true, true);
> 
> 
>   CachingWrapperFilter cachingFilter = new CachingWrapperFilter(dateFilter );
> 
> 
>     var results = _searcher.Search(bq, cachingFilter, sortBy); So, now that I am
> using filters intsead, do i need to set max clause count still? Please advise
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/If-I-put-
> a-cached-filter-do-i-still-need-to-set-the-max-clause-count-tp4192413.html
> Sent from the Lucene - General mailing list archive at Nabble.com.


RE: If I put a cached filter, do i still need to set the max clause count?

Posted by Uwe Schindler <us...@apache.org>.
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 4:21 PM
> To: general@lucene.apache.org
> Subject: If I put a cached filter, do i still need to set the max clause count?
> 
> We are using Lucene for our web site and as the index grew, we got the
> following exception.
> 
> the Message: maxClauseCount is set to 1024 Stack Trace:
> at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause) at
> Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur) Instead of
> using Range Query, I am using a Range Filter now, and wrapped it with a
> Cached Filter,
> 
>   RangeFilter dateFilter = new RangeFilter("documentpublishfrom",
> "20000101000000",
> DateTime.Now.AddYears(10).ToString("yyyyMMddHHmmss"),
> true, true);
> 
> 
>   CachingWrapperFilter cachingFilter = new CachingWrapperFilter(dateFilter );
> 
> 
>     var results = _searcher.Search(bq, cachingFilter, sortBy); So, now that I am
> using filters intsead, do i need to set max clause count still? Please advise
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/If-I-put-
> a-cached-filter-do-i-still-need-to-set-the-max-clause-count-tp4192413.html
> Sent from the Lucene - General mailing list archive at Nabble.com.