[ https://issues.apache.org/jira/browse/SOLR-11764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16532622#comment-16532622 ]
Gianpiero Sportelli commented on SOLR-11764: -------------------------------------------- Hi all, we found a solution for this issue: # we have define a PreAnalyzedField *content* in this manner: ** {{<field name="content" type="testo" indexed="true" termOffsets="true" stored="true" termPositions="true" termVectors="true" multiValued="false"/>}} ** {{<fieldType name="testo" class="solr.PreAnalyzedField">}}{{ <analyzer type="query">}}{{ <tokenizer class="solr.StandardTokenizerFactory"/>}}{{ <filter class="solr.LowerCaseFilterFactory"/>}}{{ </analyzer>}}{{ </fieldType>}} # we have set the *hl.method* to unified in solrconfig.xml ** {{ <requestHandler name="/select" class="solr.SearchHandler"><lst name="defaults"><str name="df">content</str><str name="hl.method">unified</str></lst></requestHandler>}} The key is set {{ termOffsets="true" termPositions="true" termVectors="true"}} I hope I have been helpful, Gianpiero > preanalyzed field with highlight option throws exception > -------------------------------------------------------- > > Key: SOLR-11764 > URL: https://issues.apache.org/jira/browse/SOLR-11764 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: highlighter > Affects Versions: 6.4 > Reporter: Selvam Raman > Priority: Major > > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: > Error from server at http://localhost:8983/solr/Metadata2: > org.apache.solr.client.solrj.SolrServerException: > No live SolrServers available to handle this > request:[/solr/Metadata2_shard1_replica1, > solr/Metadata2_shard2_replica2, > solr/Metadata2_shard1_replica2] > When i look at the solr logs i find the below exception > Caused by: java.io.IOException: Invalid JSON type java.lang.String, expected > Map > at > org.apache.solr.schema.JsonPreAnalyzedParser.parse(JsonPreAnalyzedParser.java:86) > at > org.apache.solr.schema.PreAnalyzedField$PreAnalyzedTokenizer.decodeInput(PreAnalyzedField.java:345) > at > org.apache.solr.schema.PreAnalyzedField$PreAnalyzedTokenizer.access$000(PreAnalyzedField.java:280) > at > org.apache.solr.schema.PreAnalyzedField$PreAnalyzedAnalyzer$1.setReader(PreAnalyzedField.java:375) > at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:202) > at > org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy.tokenStream(AnalysisOffsetStrategy.java:58) > at > org.apache.lucene.search.uhighlight.MemoryIndexOffsetStrategy.getOffsetsEnums(MemoryIndexOffsetStrategy.java:106) > ... 37 more > I am setting up lot of fields (fq, score, highlight,etc) then put it into > solrquery. > "we are using preanalyzed field and that causing the problem. > The actual problem is preanalyzed with highlight option. if i disable > highlight option it works fine." -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org