Thanks for your reply. Although I would like to say health_content_t is 
text_general and does not come back…

From: Erick Erickson [via Lucene] 
[mailto:ml-node+s472066n428351...@n3.nabble.com]
Sent: Monday, June 20, 2016 8:03 PM
To: Kalpana Sivanandan <ksivanan...@portalsolutions.net>
Subject: Re: Solr Highlights

My first question is if you're absolutely sure that the term
diabetes occurs in the title_field for the docs that are
returned?

Oh, looking again your field type for title_t is "string",
which is totally un-analyzed so I think that's your problem.
What happens if you define it as text_general and re-index?

Strings are untokenized, often a point of confusion. For
instance, the field "My dog has fleas." as a "string" type
would only match "My dog has fleas.". Searching on
"my" or "dog" would not match. Even
"My dog has fleas"
would not match (no period)....

So what was your purpose in making them "string" types?
Intentional or accident?

Best,
Erick

On Mon, Jun 20, 2016 at 7:52 PM, Kalpana
<[hidden email]</user/SendEmail.jtp?type=node&node=4283517&i=0>> wrote:

> I have a question about Highlights – would greatly appreciate you taking the
> time •
>
> I have pasted snippets of SolrCongig, schema, url and results. I am not sure
> why I don’t see the highlights for title_t, _fullpath, health_content_t etc.
> I only see it for the copied field search as it is a default field. Do I
> have to override it?
>
> Thanks in advance
>
>
>
> SolrConfig.xml
>
> <requestHandler name="/select" class="solr.SearchHandler">
>
>      <lst name="defaults">
>        <str name="echoParams">explicit</str>
>        <int name="rows">10</int>
>                    <str name="df">search</str>
>                    <str name="hl">on</str>
>                    <str name="hl.fl">*</str>
>                    <str name="hl.simple.pre">&lt;b&gt;</str>
>                    <str name="hl.simple.post">&lt;/b&gt;</str>
>      </lst>
>                 <arr name="last-components">
>                                 <str>spellcheck</str>
>                 </arr>
>     </requestHandler>
>
>
> Schema.xml
>
> <field name="id" type="string" indexed="true" stored="true" required="true"
> multiValued="false" />
>    <field name="_fullpath" type="string" indexed="true" stored="true"
> required="false" />
>    <field name="title_t" type="string" indexed="true" stored="true"
> required="false" />
>    <field name="description_t" type="string" indexed="true" stored="true"
> required="false" />
>    <field name="health_content_t" type="text_general" indexed="true"
> stored="true" required="false" />
>
>    <field name="search" type="text_general" indexed="true" stored="true"
> multiValued="true" />
>
>
>   <field name="spell" type="textSpell" indexed="true" stored="true"
> multiValued="true" />
>
>
>
>                                 <copyField source="health_content_t"
> dest="search" />
>                                 <copyField source="description_t"
> dest="search" />
>                                 <copyField source="title_t" dest="search" />
>
>
>
>                                 <copyField source="health_content_t"
> dest="spell" />
>                                 <copyField source="title_t" dest="spell" />
>                                 <copyField source="description_t"
> dest="spell" />
>
>
> Results
>
> http://localhost:8983/solr/SharePoint_News/select?q=diabetes&fl=title_t,_fullpath,_health_content_t&hl=true&hl.fl=title_t,_fullpath,_health_content_t,search&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E&hl.requireFieldMatch=true&h1.snippets=20
>
>  <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">14</int>
> <lst name="params">
> <str name="q">diabetes</str>
> <str name="hl">true</str>
> <str name="hl.simple.post"></em></str>
> <str name="fl">title_t,_fullpath,_health_content_t</str>
> <str name="hl.requireFieldMatch">true</str>
> <str name="h1.snippets">20</str>
> <str name="hl.fl">title_t,_fullpath,_health_content_t,search</str>
> <str name="h1.q">diabetes</str>
> <str name="hl.simple.pre"><em></str>
> </lst>
> </lst>
> <result name="response" numFound="156" start="0">...</result>
> <lst name="highlighting">
> <lst name="4986">
> <arr name="search">
> <str>...</str>
> </arr>
> </lst>
> <lst name="5142">
> <arr name="search">
> <str>
> National Institute of <em>Diabetes</em> and Digestive and Kidney Diseases
> </str>
> </arr>
> </lst>
> <lst name="5174">
> <arr name="search">
> <str>
> NIH News Release: A Decade Later, Lifestyle Changes or Metformin Still Lower
> Type 2 <em>Diabetes</em> Risk
> </str>
> </arr>
> </lst>
> <lst name="5169">
> <arr name="search">
> <str>
> The Environmental Determinants of <em>Diabetes</em> in the Young (TEDDY)
> Fact Sheet
> </str>
> </arr>
> </lst>
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-Highlights-tp4283511.html
> Sent from the Solr - User mailing list archive at Nabble.com.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Solr-Highlights-tp4283511p4283517.html
To unsubscribe from Solr Highlights, click 
here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4283511&code=a3NpdmFuYW5kYW5AcG9ydGFsc29sdXRpb25zLm5ldHw0MjgzNTExfDE0MzYwODg4Mjk=>.
NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Highlights-tp4283511p4283519.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to