Solr generating exception "maxClauseCount is set to 1024"

1

I have a core of Apache Solr 4.0.0 that I created and that eventually generates the exception:

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

And in fact there is an exception-related configuration in the core config.xml:

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

Supposedly increasing the value of 1024 in the resolves configuration, but why does this occur? And most of all, how do I change it without redoing the core ?

    
asked by anonymous 06.09.2017 / 15:46

1 answer

1

Days later I discovered the problem and it is not related to maxBooleanClauses in 1024 . For when I was able to get up to 4096 , Solr started to generate the same exception only on the grounds that it had popped such 4096 Boolean clauses.

The exception was generated by setting the following parameter in the query: hl.maxAnalyzedChars=1048576 , which was, at first, too high. Exception query example:

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 sample value in the Solr documentation, and everything started to work as expected. Example query that returns 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
    
15.09.2017 / 14:17