Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-34590

TooManyClauses in Faceted search with MultiValueFacet and over 1024 values

    Details

      Description

      I'm using FacetedSearcher and have a MultiValueFacet that has over 1024 values. Searching causes TooManyClauses exception with following stacktrace:

      Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
      at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:152)
      at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:143)
      at com.liferay.portal.search.lucene.BooleanQueryImpl.add(BooleanQueryImpl.java:41)
      at com.liferay.portal.kernel.search.facet.MultiValueFacet.doGetFacetClause(MultiValueFacet.java:90)
      at com.liferay.portal.kernel.search.facet.BaseFacet.getFacetClause(BaseFacet.java:34)
      at com.liferay.portal.kernel.search.FacetedSearcher.createFullQuery(FacetedSearcher.java:198)
      at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:75)
      

      It might not be a best practise to use that many values in a facet but as this is handled in LuceneIndexSearcherImpl it should be handled here also.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 6 weeks, 3 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.30 EE GA3
                  6.2.0 CE M6