lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Van Tassell, Kristian" <kristian.vantass...@siemens.com>
Subject Search returns hits but highlighting does not work for certain field
Date Fri, 01 Mar 2013 20:13:18 GMT
I have highlighting working for a generic text field, but cannot get it to work for a field
which contains raw data.

This query returns 51 hits for me:

?q=Working%20sheet%20numbers%20and%20names
qf=rawData
fl=*,score
defType=edismax
hl=true
hl.fl=rawData
hl.simple.pre=BBB
hl.simple.post=EEE
hl.fragsize=100000
hl.snippets=1000

but contains no highlighting results (ie - <highlighting></highlighting>).

An example of the data:

rawData=<!CDATA [ ...<p class="foobar">Working sheet numbers and names</p>...
]>

The solrConfig has default highlighting specifications, I removed the declarations for highlighting
entirely and it still works for my regular text queries (where I query against "text" rather
than "rawData").

<fieldType name="raw" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<tokenizer class="solr.PatternTokenizerFactory" pattern="TESTPATTERN"/>
                              <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
                              <filter class="solr.LowerCaseFilterFactory"/>
               <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
expand="true"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message