Re: Solr Hit Highlighting

2016-10-26 Thread Bryan Bende
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 
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   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.
>
> required="false" multiValued="false" />
> 
>  docValues="false" />
>  multiValued="true"/>
>
> 
> 
>
>  multiValued="false" />
>
>  stored="true" multiValued="false" />
>
> Can someone help?
>
> Thank you,
> Al
>
>
> Sent from Mail for
> Windows 10
>
>


Solr Hit Highlighting

2016-10-24 Thread Al Hudson
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   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.

   











Can someone help?

Thank you,
Al


Sent from Mail for Windows 10