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 RE: Search returns hits but highlighting does not work for certain field
Date Mon, 04 Mar 2013 14:13:34 GMT
Does anyone have any ideas? I don't understand how the query can match, as I am querying against
the same field, and yet get zero highlighting occurring. 

Just to clarify, this query, against a field called rawData 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>).

-----Original Message-----
From: Van Tassell, Kristian [mailto:kristian.vantassell@siemens.com] 
Sent: Friday, March 01, 2013 2:13 PM
To: solr-user@lucene.apache.org
Subject: Search returns hits but highlighting does not work for certain field

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
View raw message