Solr generating exception "maxClauseCount is set to 1024"

Asked

Viewed 109 times

1

I have an Apache Solr 4.0.0 core that I created that eventually generates the exception:

SEVERE
SolrDispatchFilter
null:org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024

And in fact there is a configuration related to the exception, in the core config.xml:

<conf>
    ...
    <query>
        <maxBooleanClauses>1024</maxBooleanClauses>
        ...
    </query>
    ...
</conf>

Supposed to increase the value of 1024 in the setting solves, but why does this occur? And mainly, how do I change it without redoing the core?

1 answer

1

A few days later I discovered the problem and it’s not related to maxBooleanClauses in 1024. 'Cause when I made it to 4096, Solr went on to generate the same exception only claiming to have burst such 4096 boolean clauses.

The exception was generated by defining the following parameter in the query: hl.maxAnalyzedChars=1048576, that was, at first, with a very high value. Example of query that generates exception:

http://10.10.5.86:8983/solr/sei-protocolos/select?q=%28+zaki+AND+abreu%29+AND+%28sta_protocolo%3AP+OR+sta_protocolo%3AR+OR+sta_protocolo%3AG%29+AND+%28tipo_acesso%3AP+OR+id_unidade_acesso%3A%2A1%2A%29&start=0&sort=dta_geracao+desc&hl=true&hl.snippets=2&hl.fl=content&hl.fragsize=100&hl.maxAnalyzedChars=1048576&hl.alternateField=content&hl.maxAlternateFieldLength=100&fl=id,tipo_acesso,id_unidade_acesso,id_unidade_geradora,id_unidade_aberto,identificacao_protocolo,nome_tipo_processo,protocolo_documento_formatado,protocolo_processo_formatado,sigla_unidade_geradora,descricao_unidade_geradora,sigla_usuario_gerador,nome_usuario_gerador,dta_geracao,link_arvore

I reset the value to hl.maxAnalyzedChars=10000, which is the example value in the Solr documentation, and everything went to work as expected. Example query that returns the expected:

http://10.10.5.86:8983/solr/sei-protocolos/select?q=%28+zaki+AND+abreu%29+AND+%28sta_protocolo%3AP+OR+sta_protocolo%3AR+OR+sta_protocolo%3AG%29+AND+%28tipo_acesso%3AP+OR+id_unidade_acesso%3A%2A1%2A%29&start=0&sort=dta_geracao+desc&hl=true&hl.snippets=2&hl.fl=content&hl.fragsize=100&hl.maxAnalyzedChars=10000&hl.alternateField=content&hl.maxAlternateFieldLength=100&fl=id,tipo_acesso,id_unidade_acesso,id_unidade_geradora,id_unidade_aberto,identificacao_protocolo,nome_tipo_processo,protocolo_documento_formatado,protocolo_processo_formatado,sigla_unidade_geradora,descricao_unidade_geradora,sigla_usuario_gerador,nome_usuario_gerador,dta_geracao,link_arvore

Browser other questions tagged

You are not signed in. Login or sign up in order to post.