You're only returning the "submissaoid" and "tituloprojeto" fields (along with score), and dismax is probably searching across other fields (I can't tell from the fragment, it'll be the parameters set up in solrconfig.xml, the select handler). Add &debug=all to the query and you'll see all the fields dismax is searching over.
When you specify hl.fl=*, it's saying in effect "any field that is specified in the fl list should be highlighted if there's a match". So a simple test would be to specify fl=*. Although do note that if the match is on a field that is not stored, you'll see nothing. Best, Erick 2015-09-25 7:28 GMT-07:00 Leandro Henrique <lhmolive...@hotmail.com>: > Dear Colleagues of Solr-list, > > I am using the Solr 5.0 on my work to index textual base of approximately > 3500 documents. The documents are stored in XML files. Almost everything is > right and functioning normally ... unless the highlight functionality. > > This feature is not working well! After a survey any, Solr presents the > findings, but there are documents matched that do not have highlights. I do > not understand: How a document is found that there is no highlight for him? > > Here is an example: > > => Search for "rabanete" (in Portuguese): > > => URL search: > http://localhost:8983/solr/baseprojetos/select?q=rabanete&sort=score+desc&rows=5&fl=tituloprojeto%2Csubmissaoid%2Cscore&wt=json&indent=true&defType=dismax&hl=true&hl.fl=*&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E&hl.usePhraseHighlighter=true&hl.highlightMultiTerm=true > > => Results (JSON): > ********** > "responseHeader":{ "status":0, "QTime":146, "params":{ "hl":"true", > "indent":"true", "fl":"tituloprojeto,submissaoid,score", > "hl.usePhraseHighlighter":"true", "sort":"score desc", "rows":"5", > "hl.simple.pre":"<em>", "q":"rabanete", "defType":"dismax", > "hl.simple.post":"</em>", "hl.fl":"*", "wt":"json", > "hl.highlightMultiTerm":"true"}}, > "response":{"numFound":5,"start":0,"maxScore":0.4094792,"docs":[ > > { "submissaoid":"22920", "tituloprojeto":"AVALIAÇÃO DE DISPONIBILIDADE DE > METAIS PESADOS PARA PLANTAS CULTIVADAS EM UM SOLO TRATADO COM FONTES > ALTERNATIVAS DE POTÁSSIO", "score":0.4094792}, > > { "submissaoid":"34721", "tituloprojeto":"Aperfeiçoamento do processo de > produção e definição de parâmetros ideais para produção de conservas de > brotos de soja a partir da cultivar BRS 216", "score":0.24568753}, > > { "submissaoid":"204661", "tituloprojeto":"Transferência de tecnologias de > cobertura vegetal na cultura dos citros e sua contribuição para a > agricultura conservacionista.", "score":0.08686366}, > > { "submissaoid":"204607", "tituloprojeto":"DESENVOLVIMENTO DE > INSTRUMENTAÇÃO, MÉTODOS E PROCESSOS PARA AVALIAÇÃO E USO SEGURO DE > RESÍDUOS", "score":0.057909105}, > > { "submissaoid":"210515", "tituloprojeto":"Projeto Xisto Agrícola - > Pesquisa e desenvolvimento do potencial de uso do xisto e seus coprodutos > na agricultura", "score":0.057909105}] > > "highlighting":{ > "22920":{"objetivogeral":[" presente Projeto tem como objetivo geral > estudar a disponibilidade de metais pesados provenientes de quatro fontes > alternativas de potássio, para a alface, soja e <em>rabanete</em>"]}, > "34721":{"resumoprojeto":[" o tamanho necessário para serem consumidos, > sendo fontes ricas em minerais, vitaminas, proteínas e com baixa caloria. O > \"feijão moyashi\", também conhecido como feijão mungo é a espécie mais > utilizada para a produção de brotos no Brasil. Mais de 30 espécies de > plantas, principalmente de olerícolas (brócolis, <em>rabanete</em>"]}, > "204661":{}, > "204607":{"descricaoatividade":[" de massa seca da parte aérea e raízes e > na produtividade de hortaliças.Os experimentos serão realizados na Estação > Experimental da Embrapa Clima Temperado, num Argissolo Vermelho, > utilizando-se espécies de hortaliças cujo órgão de consumo são as folhas > (alface), as raízes (<em>rabanete</em>"]}, > "210515":{descricaoatividade":[" plástica em março de 2012. O uso de > cobertura plástica nos canteiros foi para evitar possíveis perdas dos > tratamentos aplicados por lixiviação. As espécies de hortaliças avaliadas > neste estudo são <em>rabanete</em>"]}}} > > ****** > > See the document with ID = 204661 does not highlight but was found with > the third score!!! > > Where am I going wrong? Which configuration is wrong? Can anyone help me? > > Thanks in advance! > Leandro.