Hello, I think part of the problem is the mis-match between what you are highlighting on and what you are searching on.
Your query has no field specified so it must be searching a default field field which looks like it would be _text_ since the copyField was setup to copy everything to that field. So you are searching against _text_ and then highlighting on content. These two fields are also different types, one is text_en_splitting and one is text_general, I suspect that could cause a difference in finding results vs highlighting them. Some things I would try... - See what happens if your query is content:(What is lactose intolerance?) and hl.fl = content that way you are searching on what you are highlighting on - See what happens if you made content and _text_ the same type of field (either both text_en_splitting or both text_general) - You could make _text_ a stored field and set hl.fl =* or hl.fl=_text_ and that should get you highlighting results from _text_ and allow you to still use unfielded queries... normally this adds a lot of size to your index if you are copying lots of fields to _text_ but you said it is only content so maybe its fine -Bryan On Mon, Oct 24, 2016 at 11:51 PM, Al Hudson <stuckinal...@outlook.com> wrote: > Hello All, > > I’m new to the world of Solr and hoping someone on this list can help me > hit highlighting in solr. > > I am trying to set up a hit highlighting in Solr and have been seeing some > strange issues. > > My core.xml file has a single tag <content> </content> which houses all > the text in a document. > > Using the Solr web interface I submit the following query : What is milk? > – I get back many answers and in addition, just by selecting the hl box and > entering ‘content’ in the hl.fl box I get hit highlighted portions of text. > > However things stop working when I change the query to : What is lactose > intolerance? I still get valid results but the highlighting section is full > of empty arrays. > > I’ve tried different combinations of commenting out the copyField, making > content multivalued, but to be honest I’m trying things and hoping some > configuration will work. > > <field name="id" type="string" indexed="true" stored="true" > required="false" multiValued="false" /> > <field name="_version_" type="long" indexed="true" stored="false"/> > <field name="_root_" type="string" indexed="true" stored="false" > docValues="false" /> > <field name="_text_" type="text_general" indexed="true" stored="false" > multiValued="true"/> > > <!-- Only enabled in the "schemaless" data-driven example (assuming > the client > does not know what fields may be searched) because it's very > expensive to index everything twice. --> > <copyField source="*" dest="_text_"/> > > <field name="text" type="text_general" indexed="true" stored="true" > multiValued="false" /> > > <field name="content" type="text_en_splitting" indexed="true" > stored="true" multiValued="false" /> > > Can someone help? > > Thank you, > Al > > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > >