You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sambasivarao giddaluri <sa...@gmail.com> on 2020/04/28 17:09:47 UTC
Solr fields mapping
Hi All,
Is there a way we can map fields in a single field?
Ex: scheme has below fields
createdBy.userName
createdBy.name
createdBy.email
If have to retrieve these fields need to pass all the three fields in *fl*
parameter instead is there a way i can have a map or a object of these
fields in to createdBy and in fl i pass only createdBy and get all these 3
as output
Regards
sam
RE: Solr fields mapping
Posted by "Audrey Lorberfeld - Audrey.Lorberfeld@ibm.com" <Au...@ibm.com>.
Sam,
Ah, okay, I see. Hm, I wonder if you could hack "debug mode" to show you how they're interacting with the field. I'll keep thinking ...
Best,
Audrey
On 4/30/20, 3:20 PM, "sambasivarao giddaluri" <sa...@gmail.com> wrote:
Hi Audrey,
Yes i am aware of copyField but it does not fit in my use case. Reason is
while giving as output we have to show each field with its
value, with copy it combines the value but we do not know field and value
relationship.
regards
sam
On Wed, Apr 29, 2020 at 9:53 AM Audrey Lorberfeld -
Audrey.Lorberfeld@ibm.com <Au...@ibm.com> wrote:
> Hi, Sam!
>
> Have you tried creating a copyField?
> https://urldefense.proofpoint.com/v2/url?u=https-3A__builds.apache.org_view_L_view_Lucene_job_Solr-2Dreference-2Dguide-2D8.x_javadoc_copying-2Dfields.html&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=3pUA4RBPyJvc8q5RLwe2-r6UbKLIilZBzuS6NC9G0yw&s=1MxuDdlavuTpOZVDD1lGILzhSgNnPhv6Chh7dSwBGxo&e=
>
> Best,
> Audrey
>
> On 4/28/20, 1:07 PM, "sambasivarao giddaluri" <
> sambasiva.giddaluri@gmail.com> wrote:
>
> Hi All,
> Is there a way we can map fields in a single field?
> Ex: scheme has below fields
> createdBy.userName
> createdBy.name
> createdBy.email
>
> If have to retrieve these fields need to pass all the three fields in
> *fl*
> parameter instead is there a way i can have a map or a object of these
> fields in to createdBy and in fl i pass only createdBy and get all
> these 3
> as output
>
> Regards
> sam
>
>
>
Re: Solr fields mapping
Posted by matthew sporleder <ms...@gmail.com>.
fl=createdByMap:concat("createdBy.userName:
",createdBy.userName,",","createdBy.name: ",createdBy.name," ...)
On Thu, Apr 30, 2020 at 3:20 PM sambasivarao giddaluri
<sa...@gmail.com> wrote:
>
> Hi Audrey,
>
> Yes i am aware of copyField but it does not fit in my use case. Reason is
> while giving as output we have to show each field with its
> value, with copy it combines the value but we do not know field and value
> relationship.
>
> regards
> sam
>
> On Wed, Apr 29, 2020 at 9:53 AM Audrey Lorberfeld -
> Audrey.Lorberfeld@ibm.com <Au...@ibm.com> wrote:
>
> > Hi, Sam!
> >
> > Have you tried creating a copyField?
> > https://builds.apache.org/view/L/view/Lucene/job/Solr-reference-guide-8.x/javadoc/copying-fields.html
> >
> > Best,
> > Audrey
> >
> > On 4/28/20, 1:07 PM, "sambasivarao giddaluri" <
> > sambasiva.giddaluri@gmail.com> wrote:
> >
> > Hi All,
> > Is there a way we can map fields in a single field?
> > Ex: scheme has below fields
> > createdBy.userName
> > createdBy.name
> > createdBy.email
> >
> > If have to retrieve these fields need to pass all the three fields in
> > *fl*
> > parameter instead is there a way i can have a map or a object of these
> > fields in to createdBy and in fl i pass only createdBy and get all
> > these 3
> > as output
> >
> > Regards
> > sam
> >
> >
> >
Re: Solr fields mapping
Posted by sambasivarao giddaluri <sa...@gmail.com>.
Hi Audrey,
Yes i am aware of copyField but it does not fit in my use case. Reason is
while giving as output we have to show each field with its
value, with copy it combines the value but we do not know field and value
relationship.
regards
sam
On Wed, Apr 29, 2020 at 9:53 AM Audrey Lorberfeld -
Audrey.Lorberfeld@ibm.com <Au...@ibm.com> wrote:
> Hi, Sam!
>
> Have you tried creating a copyField?
> https://builds.apache.org/view/L/view/Lucene/job/Solr-reference-guide-8.x/javadoc/copying-fields.html
>
> Best,
> Audrey
>
> On 4/28/20, 1:07 PM, "sambasivarao giddaluri" <
> sambasiva.giddaluri@gmail.com> wrote:
>
> Hi All,
> Is there a way we can map fields in a single field?
> Ex: scheme has below fields
> createdBy.userName
> createdBy.name
> createdBy.email
>
> If have to retrieve these fields need to pass all the three fields in
> *fl*
> parameter instead is there a way i can have a map or a object of these
> fields in to createdBy and in fl i pass only createdBy and get all
> these 3
> as output
>
> Regards
> sam
>
>
>
Re: Solr fields mapping
Posted by "Audrey Lorberfeld - Audrey.Lorberfeld@ibm.com" <Au...@ibm.com>.
Hi, Sam!
Have you tried creating a copyField? https://builds.apache.org/view/L/view/Lucene/job/Solr-reference-guide-8.x/javadoc/copying-fields.html
Best,
Audrey
On 4/28/20, 1:07 PM, "sambasivarao giddaluri" <sa...@gmail.com> wrote:
Hi All,
Is there a way we can map fields in a single field?
Ex: scheme has below fields
createdBy.userName
createdBy.name
createdBy.email
If have to retrieve these fields need to pass all the three fields in *fl*
parameter instead is there a way i can have a map or a object of these
fields in to createdBy and in fl i pass only createdBy and get all these 3
as output
Regards
sam