I use highlighting to get the list of "hits" from queries a multi-valued String 
fields. This works fine except when the query contains a range clause on that 
field. Even though the correct documents are found, the highlighted "hits" 
contain no data values. This is the reason for my Solr jira bug Solr-13367.

This used to work in Solr 5.1.0 but it is broken in newer versions of Solr (at 
least in 7.5.0, 7.7.1, 8.0.0)

Karl

-----Original Message-----
From: Zheng Lin Edwin Yeo <edwinye...@gmail.com> 
Sent: Sunday, April 14, 2019 9:36 PM
To: solr-user@lucene.apache.org
Subject: Re: Multivalue Field lookup

You need to set the field which you want to highlight in the hl.fl parameter in 
your solrconfig.xml.
Highlighting can work in String field.

Regards,
Edwin

On Mon, 15 Apr 2019 at 05:53, Kumaresh AK <kumaresh...@nielsen.com> wrote:

> How would I go about change by field type to facilitate highlighting ? 
> I tried hl on my current schema and the highlight section is empty. I 
> guess I need to change to multivalue text. Currently it is String 
> Field as these are identifiers and no analysis needed on those....
>
> On Sun, Apr 14, 2019 at 5:29 AM Mikhail Khludnev <m...@apache.org> wrote:
>
> > Btw, can it be done by highlighting?
> >
> > On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK 
> > <kumaresh...@nielsen.com>
> > wrote:
> >
> > > Hi Mikhail,
> > > Thanks for the response. I see the results have the details I am
> looking
> > > for. But it is not well structured. I sense that the debug=results 
> > > is
> for
> > > understanding the scoring behind the results which can be more 
> > > than
> what
> > I
> > > am looking for. Is there any other way ? The multivalued field may 
> > > have some 50 items in it at most. And the query will be limited to 
> > > 100
> values.
> > >
> > > On Sun, Apr 14, 2019 at 1:04 AM Mikhail Khludnev <m...@apache.org>
> > wrote:
> > >
> > > > Hello, Kumaresh!
> > > >
> > > > If you turn it to q you may try
> > > debug=results&debug.explain.structured=true
> > > > with some performance impact.
> > > >
> > > > On Sun, Apr 14, 2019 at 2:41 AM Kumaresh AK 
> > > > <kumaresh...@nielsen.com
> >
> > > > wrote:
> > > >
> > > > > Hello!
> > > > > I am new to SOLR. This is my field type definition:
> > > > >
> > > > > > <fieldType name="myid_type" class="solr.StrField" indexed="true"
> > > > > > stored="true" multiValued="true" omitTermFreqAndPositions="true"
> > > > > > omitNorms="true" />
> > > > >
> > > > >
> > > > > One use-case we have is to lookup multiple myid with an OR 
> > > > > like
> > > > >
> > > > > > fq=myid:(1 2 3 4..)
> > > > >
> > > > > I wish to know which entry in the fq matched this document. I 
> > > > > am
> > doing
> > > a
> > > > > group query now as a hack. like:
> > > > >
> > > > > > "group.query":["myid:1", "myid:2",...]
> > > > >
> > > > > Is there a better way to do this ?
> > > > >
> > > > > Regards,
> > > > > Kumaresh
> > > > >
> > > >
> > > >
> > > > --
> > > > Sincerely yours
> > > > Mikhail Khludnev
> > > >
> > >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>

Reply via email to