Solr 5.4.0: Colored Highlight and multi-value field ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr 5.4.0: Colored Highlight and multi-value field ?

Bruno Mannina-2

Dear all,

 

Is it possible to have a colored highlight in a multi-value field ?

 

I’m succeed to do it on a textfield but not in a multi-value field, then SOLR takes hl.simple.pre / hl.simple.post as tag.

 

Thanks a lot for your help,

 

Cordialement, Best Regards

Bruno Mannina

www.matheo-software.com

www.patent-pulse.com

Tél. +33 0 970 738 743

Mob. +33 0 634 421 817

 


Garanti sans virus. www.avast.com
Reply | Threaded
Open this post in threaded view
|

Re: Solr 5.4.0: Colored Highlight and multi-value field ?

Erick Erickson
How does it not work for you? Details matter, an example set of values and
the response from Solr are good bits of info for us to have.

On Tue, Oct 3, 2017 at 3:59 PM, Bruno Mannina <[hidden email]>
wrote:

> Dear all,
>
>
>
> Is it possible to have a colored highlight in a multi-value field ?
>
>
>
> I’m succeed to do it on a textfield but not in a multi-value field, then
> SOLR takes hl.simple.pre / hl.simple.post as tag.
>
>
>
> Thanks a lot for your help,
>
>
>
> Cordialement, Best Regards
>
> Bruno Mannina
>
> www.matheo-software.com
>
> www.patent-pulse.com
>
> Tél. +33 0 970 738 743
>
> Mob. +33 0 634 421 817
>
> [image: facebook (1)] <https://www.facebook.com/PatentPulse>[image:
> 1425551717] <https://twitter.com/matheosoftware>[image: 1425551737]
> <https://www.linkedin.com/company/matheo-software>[image: 1425551760]
> <https://www.youtube.com/user/MatheoSoftware>
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Garanti
> sans virus. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_-7780043212915396992_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
Reply | Threaded
Open this post in threaded view
|

RE: Solr 5.4.0: Colored Highlight and multi-value field ?

Bruno Mannina
Hi Erik,

Sorry for the late reply, I wasn't in my office this week...

So, I give more information:

* IC is a multi-value field defined like this:
<field name="ic" type="string_ci" multiValued="true" indexed="true" stored="true"/>

* The request I use (i.e):
http://my_host/solr/collection/select?
q=ic:(A63C10* OR G06F22/086)
&start=0
&rows=10
&wt=json
&indent=true
&sort=pd+desc
&fl=*
// HighLight
&hl=true
&hl.fl=ti,ab,ic,inc,cpc,apc
&hl.simple.pre=<b style=background:yellow>
&hl.simple.post=</b>
&hl.fragmentsBuilder=colored
&hl.useFastVectorHighlighter=true
&hl.highlightMultiTerm=true
&hl.usePhraseHighlighter=true
&hl.fragsize=9999999
&hl.preserveMulti=true

* Result:
I have only one color (in my case the yellow) for all different values found

***** BUT *****

If I use a non multi-value field like ti (title) with a query with some keywords
<field name="ti" type="text_en" multiValued="true" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true"/>

*Result (i.e ti:(foo OR merge) ):
I have different colors for each different terms found


Question:
- Is it because IC field is not defined with all term*="true" options ?
- How can I have different color and not use pre and post tags ?


Many thanks for your help !

-----Message d'origine-----
De : Erick Erickson [mailto:[hidden email]]
Envoyé : mercredi 4 octobre 2017 15:48
À : solr-user
Objet : Re: Solr 5.4.0: Colored Highlight and multi-value field ?

How does it not work for you? Details matter, an example set of values and the response from Solr are good bits of info for us to have.

On Tue, Oct 3, 2017 at 3:59 PM, Bruno Mannina <[hidden email]>
wrote:

> Dear all,
>
>
>
> Is it possible to have a colored highlight in a multi-value field ?
>
>
>
> I’m succeed to do it on a textfield but not in a multi-value field,
> then SOLR takes hl.simple.pre / hl.simple.post as tag.
>
>
>
> Thanks a lot for your help,
>
>
>
> Cordialement, Best Regards
>
> Bruno Mannina
>
> www.matheo-software.com
>
> www.patent-pulse.com
>
> Tél. +33 0 970 738 743
>
> Mob. +33 0 634 421 817
>
> [image: facebook (1)] <https://www.facebook.com/PatentPulse>[image:
> 1425551717] <https://twitter.com/matheosoftware>[image: 1425551737]
> <https://www.linkedin.com/company/matheo-software>[image: 1425551760]
> <https://www.youtube.com/user/MatheoSoftware>
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_
> campaign=sig-email&utm_content=emailclient> Garanti sans virus.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_
> campaign=sig-email&utm_content=emailclient>
> <#m_-7780043212915396992_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus