How can I set "maxClauseCount" in my lucene query using Hot rod client in JDG ?

Solution Unverified - Updated -

Issue

  • While making a hot rod query using an in statement which has 1157 clauses, below exception is observed :
Uncaught exception!: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=70675 returned server error (status=0x85): org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
    at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363)
    at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152)
    at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138)
    at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
    at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68)
    at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30)
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
    at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68)
    at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53)

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content