> Beware of NOT plus OR in a search. That will certainly produce no highlights. (eg test -results when default op is OR)
Seems like a bug to me; the default operator shouldn't matter in that case I think since there is only one clause that has no BooleanQuery.Occur operator and thus the OR/AND shouldn't matter. The end effect is "test" is effectively required and should definitely be highlighted. Note to Ali: Phil's comment implies use of hl.method=unified which is not the default. On Wed, Jun 14, 2017 at 10:22 PM Phil Scadden <p.scad...@gns.cri.nz> wrote: > Just had similar issue - works for some, not others. First thing to look > at is hl.maxAnalyzedChars is the query. The default is quite small. > Since many of my documents are large PDF files, I opted to use > storeOffsetsWithPositions="true" termVectors="true" on the field I was > searching on. > This certainly did increase my index size but not too bad and certainly > fast. > https://cwiki.apache.org/confluence/display/solr/Highlighting > > Beware of NOT plus OR in a search. That will certainly produce no > highlights. (eg test -results when default op is OR) > > > -----Original Message----- > From: Ali Husain [mailto:alihus...@outlook.com] > Sent: Thursday, 15 June 2017 11:11 a.m. > To: solr-user@lucene.apache.org > Subject: Issue with highlighter > > Hi, > > > I think I've found a bug with the highlighter. I search for the word > "something" and I get an empty highlighting response for all the documents > that are returned shown below. The fields that I am searching over are > text_en, the highlighter works for a lot of queries. I have no > stopwords.txt list that could be messing this up either. > > > "highlighting":{ > "310":{}, > "103":{}, > "406":{}, > "1189":{}, > "54":{}, > "292":{}, > "309":{}}} > > > Just changing the search term to "something like" I get back this: > > > "highlighting":{ > "310":{}, > "309":{ > "content":["1949 Convention, <em>like</em> those"]}, > "103":{}, > "406":{}, > "1189":{}, > "54":{}, > "292":{}, > "286":{ > "content":["persons in these classes are treated <em>like</em> > combatants, but in other respects"]}, > "336":{ > "content":[" be treated <em>like</em> engagement"]}}} > > > So I know that I have it setup correctly, but I can't figure this out. > I've searched through JIRA/Google and haven't been able to find a similar > issue. > > > Any ideas? > > > Thanks, > > Ali > Notice: This email and any attachments are confidential and may not be > used, published or redistributed without the prior written consent of the > Institute of Geological and Nuclear Sciences Limited (GNS Science). If > received in error please destroy and immediately notify GNS Science. Do not > copy or disclose the contents. > -- Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.solrenterprisesearchserver.com