Getting org.elasticsearch.hadoop.rest.EsHadoopRemoteException: too_many_clauses: too_many_clauses: maxClauseCount is set to 1024\n

Getting the following error while running spark-sql for a simple in query

org.elasticsearch.hadoop.rest.EsHadoopRemoteException: too_many_clauses: too_many_clauses: maxClauseCount is set to 1024\n