[ https://issues.apache.org/jira/browse/SOLR-14453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley resolved SOLR-14453. --------------------------------- Resolution: Won't Fix I think this is probably a bug or limitation in the underlying SpanQuery and not the highlighters. There are some limitations of SpanQuery based queries in which it won't necessarily report all matches in the returned "spans". I don't think SpanQueries are going to be fixed (sorry) because it's a rather fundamental problem with their internal design. Instead, the Lucene project recently created a new class of queries to semi-replace SpanQuery: {{IntervalQuery}} -- _tah-dah_! I did a quick hack of {{org.apache.lucene.search.uhighlight.TestUnifiedHighlighterTermIntervals#testMatchesSlopBug}} to tweak it to look like your bug report here and it highlighted them as you want. Unfortunately, there are no query parsers in Lucene or Solr that produce them yet. Perhaps ComplexPhraseQueryParser should be modified to use IntervalQuery instead of SpanQuery. CC [~romseygeek] > Solr proximity search highlighting issue > ---------------------------------------- > > Key: SOLR-14453 > URL: https://issues.apache.org/jira/browse/SOLR-14453 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: highlighter > Affects Versions: 8.4.1 > Reporter: amit naliyapara > Priority: Major > Attachments: Highlighted-response.PNG, Not-Highlighted-response.PNG, > managed-schema, solr-doc-Id-1.txt > > > I found some problem in highlighting module. Not all the search terms are > getting highlighted. > Sample query: q={!complexphrase+inOrder=true}"pos1 (pos2 OR pos3)"~30&hl=true > Indexed text: "pos1 pos2 pos3 pos4" > You can see that only two terms are highlighted like, "<em>pos1</em> > <em>pos2</em> pos3 pos4" > Please find attached Not-highlighted-response screen shot for same. > The scenario is when term positions are in-order in document and query both. > If term position not in-order then it work proper > Sample query: q={!complexphrase+inOrder=false}"pos3 (pos1 OR pos2)"~30&hl=true > You can see that all three term are highlighted like, "<em>pos1</em> > <em>pos2</em> <em>pos3</em> pos4" > Please find attached Highlighted-response screen shot for same. > The scenario is same in Solr source code since long time (I have checked in > Solr version 4 to version 7). -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org