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 "Rathor, Piyush (US - Philadelphia)" <pr...@DELOITTE.com> on 2018/10/22 18:46:12 UTC

SOLR External Id field

Hi All,



We are storing data in solr. Please let me know on the following:

  *   How can we set a field as external id which can be used for update.
  *   What operation/ query needs to sent to update the same external id record.



Thanks & Regards

Piyush Rathor



This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.

v.E.1

Re: SOLR External Id field

Posted by Rohan Kasat <ro...@gmail.com>.
Hi Piyush,

There can be only a single unique identifier for a particular collection.

And you can index the external field as Id for already existing record and
it will replace the existing record.

Regards,
Rohan Kasat

On Mon, Oct 22, 2018 at 2:20 PM Rathor, Piyush (US - Philadelphia) <
prathor@deloitte.com> wrote:

> Hi Rohan,
>
> We need to update certain records based on external id.
> Please let me know how can we do it.
>
> Thanks & Regards
> Piyush Rathor
>
> Please consider the environment before printing.
>
> -----Original Message-----
> From: Rohan Kasat <ro...@gmail.com>
> Sent: Monday, October 22, 2018 2:46 PM
> To: solr-user@lucene.apache.org
> Subject: [EXT] Re: SOLR External Id field
>
> Piyush,
> can you elaborate your question for external ID ?
> is this the field which distinguish each record in your indexes ?
>
> Regards,
> Rohan Kasat
>
> On Mon, Oct 22, 2018 at 11:46 AM Rathor, Piyush (US - Philadelphia) <
> prathor@deloitte.com> wrote:
>
> > Hi All,
> >
> >
> >
> > We are storing data in solr. Please let me know on the following:
> >
> >   *   How can we set a field as external id which can be used for update.
> >   *   What operation/ query needs to sent to update the same external id
> > record.
> >
> >
> >
> > Thanks & Regards
> >
> > Piyush Rathor
> >
> >
> >
> > This message (including any attachments) contains confidential
> > information intended for a specific individual and purpose, and is
> > protected by law. If you are not the intended recipient, you should
> > delete this message and any disclosure, copying, or distribution of
> > this message, or the taking of any action based on it, by you is
> strictly prohibited.
> >
> > v.E.1
> >
>
>
> --
>
> *Regards,Rohan Kasat*
>
-- 

*Regards,Rohan Kasat*

RE: SOLR External Id field

Posted by "Rathor, Piyush (US - Philadelphia)" <pr...@DELOITTE.com>.
Hi Rohan,

We need to update certain records based on external id.
Please let me know how can we do it.

Thanks & Regards
Piyush Rathor

Please consider the environment before printing.

-----Original Message-----
From: Rohan Kasat <ro...@gmail.com> 
Sent: Monday, October 22, 2018 2:46 PM
To: solr-user@lucene.apache.org
Subject: [EXT] Re: SOLR External Id field

Piyush,
can you elaborate your question for external ID ?
is this the field which distinguish each record in your indexes ?

Regards,
Rohan Kasat

On Mon, Oct 22, 2018 at 11:46 AM Rathor, Piyush (US - Philadelphia) < prathor@deloitte.com> wrote:

> Hi All,
>
>
>
> We are storing data in solr. Please let me know on the following:
>
>   *   How can we set a field as external id which can be used for update.
>   *   What operation/ query needs to sent to update the same external id
> record.
>
>
>
> Thanks & Regards
>
> Piyush Rathor
>
>
>
> This message (including any attachments) contains confidential 
> information intended for a specific individual and purpose, and is 
> protected by law. If you are not the intended recipient, you should 
> delete this message and any disclosure, copying, or distribution of 
> this message, or the taking of any action based on it, by you is strictly prohibited.
>
> v.E.1
>


-- 

*Regards,Rohan Kasat*

Re: SOLR External Id field

Posted by Rohan Kasat <ro...@gmail.com>.
Piyush,
can you elaborate your question for external ID ?
is this the field which distinguish each record in your indexes ?

Regards,
Rohan Kasat

On Mon, Oct 22, 2018 at 11:46 AM Rathor, Piyush (US - Philadelphia) <
prathor@deloitte.com> wrote:

> Hi All,
>
>
>
> We are storing data in solr. Please let me know on the following:
>
>   *   How can we set a field as external id which can be used for update.
>   *   What operation/ query needs to sent to update the same external id
> record.
>
>
>
> Thanks & Regards
>
> Piyush Rathor
>
>
>
> This message (including any attachments) contains confidential information
> intended for a specific individual and purpose, and is protected by law. If
> you are not the intended recipient, you should delete this message and any
> disclosure, copying, or distribution of this message, or the taking of any
> action based on it, by you is strictly prohibited.
>
> v.E.1
>


-- 

*Regards,Rohan Kasat*

Re: SOLR External Id field

Posted by Walter Underwood <wu...@wunderwood.org>.
Solr doesn’t have an “external id”, so people aren’t understanding your question.

Each document in a Solr collection has a unique ID. One field is chosen to be that ID. I usually make a field named “id”, but that isn’t necessary.

If documents have an ID in the repository, you can send that ID to Solr when indexing the document. Send it in the field you have chosen for the unique ID.

When a new document is sent with the same ID, that will replace the existing document with that ID.

Also, you say you are storing documents in Solr. I do not recommend using Solr as a primary repository. Use a database for that.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Oct 22, 2018, at 2:19 PM, Rathor, Piyush (US - Philadelphia) <pr...@DELOITTE.com> wrote:
> 
> Thanks Shawn.
> 
> So we cannot update records based on external id?
> 
> Thanks & Regards
> Piyush Rathor
> 
> Please consider the environment before printing.
> 
> -----Original Message-----
> From: Shawn Heisey <ap...@elyograg.org>
> Sent: Monday, October 22, 2018 2:56 PM
> To: solr-user@lucene.apache.org
> Subject: [EXT] Re: SOLR External Id field
> 
> On 10/22/2018 12:46 PM, Rathor, Piyush (US - Philadelphia) wrote:
>> We are storing data in solr. Please let me know on the following:
>> 
>>   *   How can we set a field as external id which can be used for update.
>>   *   What operation/ query needs to sent to update the same external id record.
> 
> Solr has something called an External File Field.
> 
> I'm pretty sure that you cannot use a field of this type for your uniqueKey.
> 
> https://lucene.apache.org/solr/guide/6_6/working-with-external-files-and-processes.html#WorkingwithExternalFilesandProcesses-TheExternalFileFieldType
> 
> Thanks,
> Shawn
> 
> This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.
> 
> v.E.1


RE: SOLR External Id field

Posted by "Rathor, Piyush (US - Philadelphia)" <pr...@DELOITTE.com>.
Thanks Shawn.

So we cannot update records based on external id?

Thanks & Regards
Piyush Rathor

Please consider the environment before printing.

-----Original Message-----
From: Shawn Heisey <ap...@elyograg.org>
Sent: Monday, October 22, 2018 2:56 PM
To: solr-user@lucene.apache.org
Subject: [EXT] Re: SOLR External Id field

On 10/22/2018 12:46 PM, Rathor, Piyush (US - Philadelphia) wrote:
> We are storing data in solr. Please let me know on the following:
>
>    *   How can we set a field as external id which can be used for update.
>    *   What operation/ query needs to sent to update the same external id record.

Solr has something called an External File Field.

I'm pretty sure that you cannot use a field of this type for your uniqueKey.

https://lucene.apache.org/solr/guide/6_6/working-with-external-files-and-processes.html#WorkingwithExternalFilesandProcesses-TheExternalFileFieldType

Thanks,
Shawn

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.

v.E.1

Re: SOLR External Id field

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/22/2018 12:46 PM, Rathor, Piyush (US - Philadelphia) wrote:
> We are storing data in solr. Please let me know on the following:
>
>    *   How can we set a field as external id which can be used for update.
>    *   What operation/ query needs to sent to update the same external id record.

Solr has something called an External File Field.

I'm pretty sure that you cannot use a field of this type for your uniqueKey.

https://lucene.apache.org/solr/guide/6_6/working-with-external-files-and-processes.html#WorkingwithExternalFilesandProcesses-TheExternalFileFieldType

Thanks,
Shawn