Multivalue Field lookup

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

Multivalue Field lookup

Kumaresh AK
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
Reply | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Mikhail Khludnev-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Kumaresh AK
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 <[hidden email]> 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 <[hidden email]>
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Mikhail Khludnev-2
Btw, can it be done by highlighting?

On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > 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 | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Kumaresh AK
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 <[hidden email]> wrote:

> Btw, can it be done by highlighting?
>
> On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK <[hidden email]>
> 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 <[hidden email]>
> 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 <[hidden email]>
> > > 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 | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Zheng Lin Edwin Yeo
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 <[hidden email]> 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 <[hidden email]> wrote:
>
> > Btw, can it be done by highlighting?
> >
> > On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK <[hidden email]>
> > 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 <[hidden email]>
> > 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 <[hidden email]
> >
> > > > 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 | Threaded
Open this post in threaded view
|

RE: Multivalue Field lookup

Wolf, Karl (NIH/NLM/LHC) [C]
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 <[hidden email]>
Sent: Sunday, April 14, 2019 9:36 PM
To: [hidden email]
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 <[hidden email]> 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 <[hidden email]> wrote:
>
> > Btw, can it be done by highlighting?
> >
> > On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK
> > <[hidden email]>
> > 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 <[hidden email]>
> > 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
> > > > <[hidden email]
> >
> > > > 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 | Threaded
Open this post in threaded view
|

Re: Multivalue Field lookup

Kumaresh AK
In reply to this post by Zheng Lin Edwin Yeo
Thanks Edwin for the information. I will try highlighting..

On Sun, Apr 14, 2019 at 7:53 PM Zheng Lin Edwin Yeo <[hidden email]>
wrote:

> 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 <[hidden email]> 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 <[hidden email]>
> wrote:
> >
> > > Btw, can it be done by highlighting?
> > >
> > > On Sun, Apr 14, 2019 at 3:22 PM Kumaresh AK <[hidden email]>
> > > 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 <[hidden email]>
> > > 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 <
> [hidden email]
> > >
> > > > > 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
> > >
> >
>