Re: Delete documents from the Solr index using SolrJ

2019-11-05 Thread Erick Erickson
OK, you have two options:

1.1> do NOT construct IDs with the version. Have two separate fields, id (which 
is the  in your schema and a _separate_ field called tracking (note, 
there’s already by default an _version_ field, with underscores, for optimistic 
locking, do not use that).

1.2> Index the new version of the doc with the exact same ID and a new version 
and a new “tracking” value

Solr will replace the old version with the new version based on the ID.

Second:
Before you re-add the doc, issue a delete-by-query that identifies the 
document, something like q=id:123*

_How_ you determine that there is a new version of the doc you need to index is 
outside of Solr, you have to do that yourself.

Best,
Erick

> On Nov 5, 2019, at 3:56 AM, Khare, Kushal (MIND) 
>  wrote:
> 
> Well, I cannot still completely relate to the solutions by you guys, am 
> looking into it as how could I achieve that with my application. Thanks !
> One thing, that I want to know is how to avoid full re-indexing, that is, 
> what I need is I don’t want that Solr index all the data every time some docs 
> are added, instead I want it to update it, that is index only newly added 
> docs. I hope this is possible, but how ?
> Because, currently I am using SolrJ  and it re-index complete data each time.
> 
> -Original Message-
> From: Peter Lancaster [mailto:peter.lancas...@findmypast.com]
> Sent: 04 November 2019 21:35
> To: solr-user@lucene.apache.org
> Subject: RE: Delete documents from the Solr index using SolrJ
> 
> You can delete documents in SolrJ by using deleteByQuery. Using this you can 
> delete any number of documents from your index or all your documents 
> depending on the query you specify as the parameter. How you use it is down 
> to your application.
> 
> You haven't said if your application performs a full re-index, but if so you 
> might find it useful to index a version number for your data which you 
> increment each time you perform the full indexing. Then you can increment 
> version, re-index data, delete data for old version number.
> 
> 
> -Original Message-
> From: Khare, Kushal (MIND) [mailto:kushal.kh...@mind-infotech.com]
> Sent: 04 November 2019 15:03
> To: solr-user@lucene.apache.org
> Subject: [EXTERNAL] RE: Delete documents from the Solr index using SolrJ
> 
> Thanks!
> Actually am working on a Java web application using SolrJ for Solr search.
> The users would actually be uploading/editing/deleting the docs. What have 
> done is defined a location/directory where the docs would be stored and 
> passed that location for indexing.
> So, I am quite confused how to carry on with the solution that you proposed. 
> Please guide !
> 
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:10
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
> 
> delete them by query would do the trick unless im missing something 
> significant in what youre trying to do here. you can just pass in an xml
> command:
> '".$kill_query."'
> 
> On Mon, Nov 4, 2019 at 9:37 AM Khare, Kushal (MIND) < 
> kushal.kh...@mind-infotech.com> wrote:
> 
>> In my case, id won't be same.
>> Suppose, I have a doc with id : 20
>> Now, it's newer version would be either 20.1 or 22 What in this case?
>> -Original Message-
>> From: David Hastings [mailto:hastings.recurs...@gmail.com]
>> Sent: 04 November 2019 20:04
>> To: solr-user@lucene.apache.org
>> Subject: Re: Delete documents from the Solr index using SolrJ
>> 
>> when you add a new document using the same "id" value as another it
>> just over writes it
>> 
>> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
>> kushal.kh...@mind-infotech.com> wrote:
>> 
>>> Could you please let me know how to achieve that ?
>>> 
>>> 
>>> -Original Message-
>>> From: Jörn Franke [mailto:jornfra...@gmail.com]
>>> Sent: 04 November 2019 19:59
>>> To: solr-user@lucene.apache.org
>>> Subject: Re: Delete documents from the Solr index using SolrJ
>>> 
>>> I don’t understand why it is not possible.
>>> 
>>> However why don’t you simply overwrite the existing document instead
>>> of
>>> add+delete
>>> 
>>>> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
>>> kushal.kh...@mind-infotech.com>:
>>>> 
>>>> Hello mates!
>>>> I want to know how we can delete the documents from the Solr index .
>>> Suppose for my system, I have a document that has been indexed, now
>&g

RE: Delete documents from the Solr index using SolrJ

2019-11-05 Thread Khare, Kushal (MIND)
Well, I cannot still completely relate to the solutions by you guys, am looking 
into it as how could I achieve that with my application. Thanks !
One thing, that I want to know is how to avoid full re-indexing, that is, what 
I need is I don’t want that Solr index all the data every time some docs are 
added, instead I want it to update it, that is index only newly added docs. I 
hope this is possible, but how ?
Because, currently I am using SolrJ  and it re-index complete data each time.

-Original Message-
From: Peter Lancaster [mailto:peter.lancas...@findmypast.com]
Sent: 04 November 2019 21:35
To: solr-user@lucene.apache.org
Subject: RE: Delete documents from the Solr index using SolrJ

You can delete documents in SolrJ by using deleteByQuery. Using this you can 
delete any number of documents from your index or all your documents depending 
on the query you specify as the parameter. How you use it is down to your 
application.

You haven't said if your application performs a full re-index, but if so you 
might find it useful to index a version number for your data which you 
increment each time you perform the full indexing. Then you can increment 
version, re-index data, delete data for old version number.


-Original Message-
From: Khare, Kushal (MIND) [mailto:kushal.kh...@mind-infotech.com]
Sent: 04 November 2019 15:03
To: solr-user@lucene.apache.org
Subject: [EXTERNAL] RE: Delete documents from the Solr index using SolrJ

Thanks!
Actually am working on a Java web application using SolrJ for Solr search.
The users would actually be uploading/editing/deleting the docs. What have done 
is defined a location/directory where the docs would be stored and passed that 
location for indexing.
So, I am quite confused how to carry on with the solution that you proposed. 
Please guide !

-Original Message-
From: David Hastings [mailto:hastings.recurs...@gmail.com]
Sent: 04 November 2019 20:10
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

delete them by query would do the trick unless im missing something significant 
in what youre trying to do here. you can just pass in an xml
command:
'".$kill_query."'

On Mon, Nov 4, 2019 at 9:37 AM Khare, Kushal (MIND) < 
kushal.kh...@mind-infotech.com> wrote:

> In my case, id won't be same.
> Suppose, I have a doc with id : 20
> Now, it's newer version would be either 20.1 or 22 What in this case?
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:04
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> when you add a new document using the same "id" value as another it
> just over writes it
>
> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com> wrote:
>
> > Could you please let me know how to achieve that ?
> >
> >
> > -Original Message-
> > From: Jörn Franke [mailto:jornfra...@gmail.com]
> > Sent: 04 November 2019 19:59
> > To: solr-user@lucene.apache.org
> > Subject: Re: Delete documents from the Solr index using SolrJ
> >
> > I don’t understand why it is not possible.
> >
> > However why don’t you simply overwrite the existing document instead
> > of
> > add+delete
> >
> > > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> > kushal.kh...@mind-infotech.com>:
> > >
> > > Hello mates!
> > > I want to know how we can delete the documents from the Solr index .
> > Suppose for my system, I have a document that has been indexed, now
> > its newer version is into use, so I want to use the latest one, for
> > that I want the previous one to be deleted from the index.
> > > Kindly help me a way out !
> > > I went through many articles and blogs, got the way (methods) for
> > deleting , but not actually, how to do it, because it's not possible
> > to delete every time by passing id's in around 50,000 doc system.
> > > Please suggest!
> > >
> > > 
> > >
> > > The information contained in this electronic message and any
> > > attachments
> > to this message are intended for the exclusive use of the
> > addressee(s) and may contain proprietary, confidential or privileged 
> > information.
> > If you are not the intended recipient, you should not disseminate,
> > distribute or copy this e-mail. Please notify the sender immediately
> > and destroy all copies of this message and any attachments. WARNING:
> > Computer viruses can be transmitted via email. The recipient should
> > check this email and any attachments for the presence of viruses.
> >

Re: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Erick Erickson
What Walter said. If you require displaying the version number in the UI, put 
that in a separate field.

BTW, Delete-by-query can be expensive for various arcane reasons if you’re 
using SolrCloud.

> On Nov 4, 2019, at 11:08 AM, Walter Underwood  wrote:
> 
> If it is the same document, why are you changing the ID? Use the same ID and 
> you are done. You won’t need to delete previous versions.
> 
> wunder
> Walter Underwood
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
> 
>> On Nov 4, 2019, at 8:37 AM, Khare, Kushal (MIND) 
>>  wrote:
>> 
>> In my case, id won't be same.
>> Suppose, I have a doc with id : 20
>> Now, it's newer version would be either 20.1 or 22
>> What in this case?
>> -Original Message-
>> From: David Hastings [mailto:hastings.recurs...@gmail.com]
>> Sent: 04 November 2019 20:04
>> To: solr-user@lucene.apache.org
>> Subject: Re: Delete documents from the Solr index using SolrJ
>> 
>> when you add a new document using the same "id" value as another it just 
>> over writes it
>> 
>> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) < 
>> kushal.kh...@mind-infotech.com> wrote:
>> 
>>> Could you please let me know how to achieve that ?
>>> 
>>> 
>>> -Original Message-
>>> From: Jörn Franke [mailto:jornfra...@gmail.com]
>>> Sent: 04 November 2019 19:59
>>> To: solr-user@lucene.apache.org
>>> Subject: Re: Delete documents from the Solr index using SolrJ
>>> 
>>> I don’t understand why it is not possible.
>>> 
>>> However why don’t you simply overwrite the existing document instead
>>> of
>>> add+delete
>>> 
>>>> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
>>> kushal.kh...@mind-infotech.com>:
>>>> 
>>>> Hello mates!
>>>> I want to know how we can delete the documents from the Solr index .
>>> Suppose for my system, I have a document that has been indexed, now
>>> its newer version is into use, so I want to use the latest one, for
>>> that I want the previous one to be deleted from the index.
>>>> Kindly help me a way out !
>>>> I went through many articles and blogs, got the way (methods) for
>>> deleting , but not actually, how to do it, because it's not possible
>>> to delete every time by passing id's in around 50,000 doc system.
>>>> Please suggest!
>>>> 
>>>> 
>>>> 
>>>> The information contained in this electronic message and any
>>>> attachments
>>> to this message are intended for the exclusive use of the addressee(s)
>>> and may contain proprietary, confidential or privileged information.
>>> If you are not the intended recipient, you should not disseminate,
>>> distribute or copy this e-mail. Please notify the sender immediately
>>> and destroy all copies of this message and any attachments. WARNING:
>>> Computer viruses can be transmitted via email. The recipient should
>>> check this email and any attachments for the presence of viruses. The
>>> company accepts no liability for any damage caused by any
>>> virus/trojan/worms/malicious code transmitted by this email.
>>> www.motherson.com
>>> 
>>> 
>>> 
>>> The information contained in this electronic message and any
>>> attachments to this message are intended for the exclusive use of the
>>> addressee(s) and may contain proprietary, confidential or privileged
>>> information. If you are not the intended recipient, you should not
>>> disseminate, distribute or copy this e-mail. Please notify the sender
>>> immediately and destroy all copies of this message and any
>>> attachments. WARNING: Computer viruses can be transmitted via email.
>>> The recipient should check this email and any attachments for the
>>> presence of viruses. The company accepts no liability for any damage
>>> caused by any virus/trojan/worms/malicious code transmitted by this
>>> email. www.motherson.com
>>> 
>> 
>> 
>> 
>> The information contained in this electronic message and any attachments to 
>> this message are intended for the exclusive use of the addressee(s) and may 
>> contain proprietary, confidential or privileged information. If you are not 
>> the intended recipient, you should not disseminate, distribute or copy this 
>> e-mail. Please notify the sender immediately and destroy all copies of this 
>> message and any attachments. WARNING: Computer viruses can be transmitted 
>> via email. The recipient should check this email and any attachments for the 
>> presence of viruses. The company accepts no liability for any damage caused 
>> by any virus/trojan/worms/malicious code transmitted by this email. 
>> www.motherson.com
> 



Re: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Walter Underwood
If it is the same document, why are you changing the ID? Use the same ID and 
you are done. You won’t need to delete previous versions.

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

> On Nov 4, 2019, at 8:37 AM, Khare, Kushal (MIND) 
>  wrote:
> 
> In my case, id won't be same.
> Suppose, I have a doc with id : 20
> Now, it's newer version would be either 20.1 or 22
> What in this case?
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:04
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
> 
> when you add a new document using the same "id" value as another it just over 
> writes it
> 
> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) < 
> kushal.kh...@mind-infotech.com> wrote:
> 
>> Could you please let me know how to achieve that ?
>> 
>> 
>> -Original Message-
>> From: Jörn Franke [mailto:jornfra...@gmail.com]
>> Sent: 04 November 2019 19:59
>> To: solr-user@lucene.apache.org
>> Subject: Re: Delete documents from the Solr index using SolrJ
>> 
>> I don’t understand why it is not possible.
>> 
>> However why don’t you simply overwrite the existing document instead
>> of
>> add+delete
>> 
>>> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
>> kushal.kh...@mind-infotech.com>:
>>> 
>>> Hello mates!
>>> I want to know how we can delete the documents from the Solr index .
>> Suppose for my system, I have a document that has been indexed, now
>> its newer version is into use, so I want to use the latest one, for
>> that I want the previous one to be deleted from the index.
>>> Kindly help me a way out !
>>> I went through many articles and blogs, got the way (methods) for
>> deleting , but not actually, how to do it, because it's not possible
>> to delete every time by passing id's in around 50,000 doc system.
>>> Please suggest!
>>> 
>>> 
>>> 
>>> The information contained in this electronic message and any
>>> attachments
>> to this message are intended for the exclusive use of the addressee(s)
>> and may contain proprietary, confidential or privileged information.
>> If you are not the intended recipient, you should not disseminate,
>> distribute or copy this e-mail. Please notify the sender immediately
>> and destroy all copies of this message and any attachments. WARNING:
>> Computer viruses can be transmitted via email. The recipient should
>> check this email and any attachments for the presence of viruses. The
>> company accepts no liability for any damage caused by any
>> virus/trojan/worms/malicious code transmitted by this email.
>> www.motherson.com
>> 
>> 
>> 
>> The information contained in this electronic message and any
>> attachments to this message are intended for the exclusive use of the
>> addressee(s) and may contain proprietary, confidential or privileged
>> information. If you are not the intended recipient, you should not
>> disseminate, distribute or copy this e-mail. Please notify the sender
>> immediately and destroy all copies of this message and any
>> attachments. WARNING: Computer viruses can be transmitted via email.
>> The recipient should check this email and any attachments for the
>> presence of viruses. The company accepts no liability for any damage
>> caused by any virus/trojan/worms/malicious code transmitted by this
>> email. www.motherson.com
>> 
> 
> 
> 
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. WARNING: Computer viruses can be transmitted via 
> email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus/trojan/worms/malicious code transmitted by this email. 
> www.motherson.com



RE: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Peter Lancaster
You can delete documents in SolrJ by using deleteByQuery. Using this you can 
delete any number of documents from your index or all your documents depending 
on the query you specify as the parameter. How you use it is down to your 
application.

You haven't said if your application performs a full re-index, but if so you 
might find it useful to index a version number for your data which you 
increment each time you perform the full indexing. Then you can increment 
version, re-index data, delete data for old version number.


-Original Message-
From: Khare, Kushal (MIND) [mailto:kushal.kh...@mind-infotech.com]
Sent: 04 November 2019 15:03
To: solr-user@lucene.apache.org
Subject: [EXTERNAL] RE: Delete documents from the Solr index using SolrJ

Thanks!
Actually am working on a Java web application using SolrJ for Solr search.
The users would actually be uploading/editing/deleting the docs. What have done 
is defined a location/directory where the docs would be stored and passed that 
location for indexing.
So, I am quite confused how to carry on with the solution that you proposed. 
Please guide !

-Original Message-
From: David Hastings [mailto:hastings.recurs...@gmail.com]
Sent: 04 November 2019 20:10
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

delete them by query would do the trick unless im missing something significant 
in what youre trying to do here. you can just pass in an xml
command:
'".$kill_query."'

On Mon, Nov 4, 2019 at 9:37 AM Khare, Kushal (MIND) < 
kushal.kh...@mind-infotech.com> wrote:

> In my case, id won't be same.
> Suppose, I have a doc with id : 20
> Now, it's newer version would be either 20.1 or 22 What in this case?
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:04
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> when you add a new document using the same "id" value as another it
> just over writes it
>
> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com> wrote:
>
> > Could you please let me know how to achieve that ?
> >
> >
> > -Original Message-
> > From: Jörn Franke [mailto:jornfra...@gmail.com]
> > Sent: 04 November 2019 19:59
> > To: solr-user@lucene.apache.org
> > Subject: Re: Delete documents from the Solr index using SolrJ
> >
> > I don’t understand why it is not possible.
> >
> > However why don’t you simply overwrite the existing document instead
> > of
> > add+delete
> >
> > > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> > kushal.kh...@mind-infotech.com>:
> > >
> > > Hello mates!
> > > I want to know how we can delete the documents from the Solr index .
> > Suppose for my system, I have a document that has been indexed, now
> > its newer version is into use, so I want to use the latest one, for
> > that I want the previous one to be deleted from the index.
> > > Kindly help me a way out !
> > > I went through many articles and blogs, got the way (methods) for
> > deleting , but not actually, how to do it, because it's not possible
> > to delete every time by passing id's in around 50,000 doc system.
> > > Please suggest!
> > >
> > > 
> > >
> > > The information contained in this electronic message and any
> > > attachments
> > to this message are intended for the exclusive use of the
> > addressee(s) and may contain proprietary, confidential or privileged 
> > information.
> > If you are not the intended recipient, you should not disseminate,
> > distribute or copy this e-mail. Please notify the sender immediately
> > and destroy all copies of this message and any attachments. WARNING:
> > Computer viruses can be transmitted via email. The recipient should
> > check this email and any attachments for the presence of viruses.
> > The company accepts no liability for any damage caused by any
> > virus/trojan/worms/malicious code transmitted by this email.
> > www.motherson.com
> >
> > 
> >
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of
> > the
> > addressee(s) and may contain proprietary, confidential or privileged
> > information. If you are not the intended recipient, you should not
> > disseminate, distribute or copy this e-mail. Please notify the
> > sender immediately and destroy all copies of this message and any
> >

RE: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Khare, Kushal (MIND)
Thanks!
Actually am working on a Java web application using SolrJ for Solr search.
The users would actually be uploading/editing/deleting the docs. What have done 
is defined a location/directory where the docs would be stored and passed that 
location for indexing.
So, I am quite confused how to carry on with the solution that you proposed. 
Please guide !

-Original Message-
From: David Hastings [mailto:hastings.recurs...@gmail.com]
Sent: 04 November 2019 20:10
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

delete them by query would do the trick unless im missing something significant 
in what youre trying to do here. you can just pass in an xml
command:
'".$kill_query."'

On Mon, Nov 4, 2019 at 9:37 AM Khare, Kushal (MIND) < 
kushal.kh...@mind-infotech.com> wrote:

> In my case, id won't be same.
> Suppose, I have a doc with id : 20
> Now, it's newer version would be either 20.1 or 22 What in this case?
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:04
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> when you add a new document using the same "id" value as another it
> just over writes it
>
> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com> wrote:
>
> > Could you please let me know how to achieve that ?
> >
> >
> > -Original Message-
> > From: Jörn Franke [mailto:jornfra...@gmail.com]
> > Sent: 04 November 2019 19:59
> > To: solr-user@lucene.apache.org
> > Subject: Re: Delete documents from the Solr index using SolrJ
> >
> > I don’t understand why it is not possible.
> >
> > However why don’t you simply overwrite the existing document instead
> > of
> > add+delete
> >
> > > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> > kushal.kh...@mind-infotech.com>:
> > >
> > > Hello mates!
> > > I want to know how we can delete the documents from the Solr index .
> > Suppose for my system, I have a document that has been indexed, now
> > its newer version is into use, so I want to use the latest one, for
> > that I want the previous one to be deleted from the index.
> > > Kindly help me a way out !
> > > I went through many articles and blogs, got the way (methods) for
> > deleting , but not actually, how to do it, because it's not possible
> > to delete every time by passing id's in around 50,000 doc system.
> > > Please suggest!
> > >
> > > 
> > >
> > > The information contained in this electronic message and any
> > > attachments
> > to this message are intended for the exclusive use of the
> > addressee(s) and may contain proprietary, confidential or privileged 
> > information.
> > If you are not the intended recipient, you should not disseminate,
> > distribute or copy this e-mail. Please notify the sender immediately
> > and destroy all copies of this message and any attachments. WARNING:
> > Computer viruses can be transmitted via email. The recipient should
> > check this email and any attachments for the presence of viruses.
> > The company accepts no liability for any damage caused by any
> > virus/trojan/worms/malicious code transmitted by this email.
> > www.motherson.com
> >
> > 
> >
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of
> > the
> > addressee(s) and may contain proprietary, confidential or privileged
> > information. If you are not the intended recipient, you should not
> > disseminate, distribute or copy this e-mail. Please notify the
> > sender immediately and destroy all copies of this message and any
> > attachments. WARNING: Computer viruses can be transmitted via email.
> > The recipient should check this email and any attachments for the
> > presence of viruses. The company accepts no liability for any damage
> > caused by any virus/trojan/worms/malicious code transmitted by this
> > email. www.motherson.com
> >
>
> 
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
>

Re: Delete documents from the Solr index using SolrJ

2019-11-04 Thread David Hastings
delete them by query would do the trick unless im missing something
significant in what youre trying to do here. you can just pass in an xml
command:
'".$kill_query."'

On Mon, Nov 4, 2019 at 9:37 AM Khare, Kushal (MIND) <
kushal.kh...@mind-infotech.com> wrote:

> In my case, id won't be same.
> Suppose, I have a doc with id : 20
> Now, it's newer version would be either 20.1 or 22
> What in this case?
> -Original Message-
> From: David Hastings [mailto:hastings.recurs...@gmail.com]
> Sent: 04 November 2019 20:04
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> when you add a new document using the same "id" value as another it just
> over writes it
>
> On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com> wrote:
>
> > Could you please let me know how to achieve that ?
> >
> >
> > -Original Message-
> > From: Jörn Franke [mailto:jornfra...@gmail.com]
> > Sent: 04 November 2019 19:59
> > To: solr-user@lucene.apache.org
> > Subject: Re: Delete documents from the Solr index using SolrJ
> >
> > I don’t understand why it is not possible.
> >
> > However why don’t you simply overwrite the existing document instead
> > of
> > add+delete
> >
> > > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> > kushal.kh...@mind-infotech.com>:
> > >
> > > Hello mates!
> > > I want to know how we can delete the documents from the Solr index .
> > Suppose for my system, I have a document that has been indexed, now
> > its newer version is into use, so I want to use the latest one, for
> > that I want the previous one to be deleted from the index.
> > > Kindly help me a way out !
> > > I went through many articles and blogs, got the way (methods) for
> > deleting , but not actually, how to do it, because it's not possible
> > to delete every time by passing id's in around 50,000 doc system.
> > > Please suggest!
> > >
> > > 
> > >
> > > The information contained in this electronic message and any
> > > attachments
> > to this message are intended for the exclusive use of the addressee(s)
> > and may contain proprietary, confidential or privileged information.
> > If you are not the intended recipient, you should not disseminate,
> > distribute or copy this e-mail. Please notify the sender immediately
> > and destroy all copies of this message and any attachments. WARNING:
> > Computer viruses can be transmitted via email. The recipient should
> > check this email and any attachments for the presence of viruses. The
> > company accepts no liability for any damage caused by any
> > virus/trojan/worms/malicious code transmitted by this email.
> > www.motherson.com
> >
> > 
> >
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > addressee(s) and may contain proprietary, confidential or privileged
> > information. If you are not the intended recipient, you should not
> > disseminate, distribute or copy this e-mail. Please notify the sender
> > immediately and destroy all copies of this message and any
> > attachments. WARNING: Computer viruses can be transmitted via email.
> > The recipient should check this email and any attachments for the
> > presence of viruses. The company accepts no liability for any damage
> > caused by any virus/trojan/worms/malicious code transmitted by this
> > email. www.motherson.com
> >
>
> 
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments. WARNING: Computer viruses can be
> transmitted via email. The recipient should check this email and any
> attachments for the presence of viruses. The company accepts no liability
> for any damage caused by any virus/trojan/worms/malicious code transmitted
> by this email. www.motherson.com
>


RE: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Khare, Kushal (MIND)
In my case, id won't be same.
Suppose, I have a doc with id : 20
Now, it's newer version would be either 20.1 or 22
What in this case?
-Original Message-
From: David Hastings [mailto:hastings.recurs...@gmail.com]
Sent: 04 November 2019 20:04
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

when you add a new document using the same "id" value as another it just over 
writes it

On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) < 
kushal.kh...@mind-infotech.com> wrote:

> Could you please let me know how to achieve that ?
>
>
> -Original Message-
> From: Jörn Franke [mailto:jornfra...@gmail.com]
> Sent: 04 November 2019 19:59
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> I don’t understand why it is not possible.
>
> However why don’t you simply overwrite the existing document instead
> of
> add+delete
>
> > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com>:
> >
> > Hello mates!
> > I want to know how we can delete the documents from the Solr index .
> Suppose for my system, I have a document that has been indexed, now
> its newer version is into use, so I want to use the latest one, for
> that I want the previous one to be deleted from the index.
> > Kindly help me a way out !
> > I went through many articles and blogs, got the way (methods) for
> deleting , but not actually, how to do it, because it's not possible
> to delete every time by passing id's in around 50,000 doc system.
> > Please suggest!
> >
> > 
> >
> > The information contained in this electronic message and any
> > attachments
> to this message are intended for the exclusive use of the addressee(s)
> and may contain proprietary, confidential or privileged information.
> If you are not the intended recipient, you should not disseminate,
> distribute or copy this e-mail. Please notify the sender immediately
> and destroy all copies of this message and any attachments. WARNING:
> Computer viruses can be transmitted via email. The recipient should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any
> virus/trojan/worms/malicious code transmitted by this email.
> www.motherson.com
>
> 
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments. WARNING: Computer viruses can be transmitted via email.
> The recipient should check this email and any attachments for the
> presence of viruses. The company accepts no liability for any damage
> caused by any virus/trojan/worms/malicious code transmitted by this
> email. www.motherson.com
>



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any 
virus/trojan/worms/malicious code transmitted by this email. www.motherson.com


RE: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Khare, Kushal (MIND)
Basically , what I need is to refresh the index. Suppose, in a directory I have 
4 docs, that have been indexed. So, my search works upon those 4.
Now, when I delete one of them, re-index and search, still that deleted 
document from the directory is being searched upon.
Hope I have made it a bit more clear now.

-Original Message-
From: Khare, Kushal (MIND) [mailto:kushal.kh...@mind-infotech.com]
Sent: 04 November 2019 20:00
To: solr-user@lucene.apache.org
Subject: RE: Delete documents from the Solr index using SolrJ

Could you please let me know how to achieve that ?


-Original Message-
From: Jörn Franke [mailto:jornfra...@gmail.com]
Sent: 04 November 2019 19:59
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

I don’t understand why it is not possible.

However why don’t you simply overwrite the existing document instead of 
add+delete

> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) 
> :
>
> Hello mates!
> I want to know how we can delete the documents from the Solr index . Suppose 
> for my system, I have a document that has been indexed, now its newer version 
> is into use, so I want to use the latest one, for that I want the previous 
> one to be deleted from the index.
> Kindly help me a way out !
> I went through many articles and blogs, got the way (methods) for deleting , 
> but not actually, how to do it, because it's not possible to delete every 
> time by passing id's in around 50,000 doc system.
> Please suggest!
>
> 
>
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. WARNING: Computer viruses can be transmitted via 
> email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus/trojan/worms/malicious code transmitted by this email. 
> www.motherson.com



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any 
virus/trojan/worms/malicious code transmitted by this email. www.motherson.com



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any 
virus/trojan/worms/malicious code transmitted by this email. www.motherson.com


Re: Delete documents from the Solr index using SolrJ

2019-11-04 Thread David Hastings
when you add a new document using the same "id" value as another it just
over writes it

On Mon, Nov 4, 2019 at 9:30 AM Khare, Kushal (MIND) <
kushal.kh...@mind-infotech.com> wrote:

> Could you please let me know how to achieve that ?
>
>
> -Original Message-
> From: Jörn Franke [mailto:jornfra...@gmail.com]
> Sent: 04 November 2019 19:59
> To: solr-user@lucene.apache.org
> Subject: Re: Delete documents from the Solr index using SolrJ
>
> I don’t understand why it is not possible.
>
> However why don’t you simply overwrite the existing document instead of
> add+delete
>
> > Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) <
> kushal.kh...@mind-infotech.com>:
> >
> > Hello mates!
> > I want to know how we can delete the documents from the Solr index .
> Suppose for my system, I have a document that has been indexed, now its
> newer version is into use, so I want to use the latest one, for that I want
> the previous one to be deleted from the index.
> > Kindly help me a way out !
> > I went through many articles and blogs, got the way (methods) for
> deleting , but not actually, how to do it, because it's not possible to
> delete every time by passing id's in around 50,000 doc system.
> > Please suggest!
> >
> > 
> >
> > The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments. WARNING: Computer viruses can be
> transmitted via email. The recipient should check this email and any
> attachments for the presence of viruses. The company accepts no liability
> for any damage caused by any virus/trojan/worms/malicious code transmitted
> by this email. www.motherson.com
>
> 
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments. WARNING: Computer viruses can be
> transmitted via email. The recipient should check this email and any
> attachments for the presence of viruses. The company accepts no liability
> for any damage caused by any virus/trojan/worms/malicious code transmitted
> by this email. www.motherson.com
>


RE: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Khare, Kushal (MIND)
Could you please let me know how to achieve that ?


-Original Message-
From: Jörn Franke [mailto:jornfra...@gmail.com]
Sent: 04 November 2019 19:59
To: solr-user@lucene.apache.org
Subject: Re: Delete documents from the Solr index using SolrJ

I don’t understand why it is not possible.

However why don’t you simply overwrite the existing document instead of 
add+delete

> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) 
> :
>
> Hello mates!
> I want to know how we can delete the documents from the Solr index . Suppose 
> for my system, I have a document that has been indexed, now its newer version 
> is into use, so I want to use the latest one, for that I want the previous 
> one to be deleted from the index.
> Kindly help me a way out !
> I went through many articles and blogs, got the way (methods) for deleting , 
> but not actually, how to do it, because it's not possible to delete every 
> time by passing id's in around 50,000 doc system.
> Please suggest!
>
> 
>
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. WARNING: Computer viruses can be transmitted via 
> email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus/trojan/worms/malicious code transmitted by this email. 
> www.motherson.com



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any 
virus/trojan/worms/malicious code transmitted by this email. www.motherson.com


Re: Delete documents from the Solr index using SolrJ

2019-11-04 Thread Jörn Franke
I don’t understand why it is not possible.

However why don’t you simply overwrite the existing document instead of 
add+delete

> Am 04.11.2019 um 15:12 schrieb Khare, Kushal (MIND) 
> :
> 
> Hello mates!
> I want to know how we can delete the documents from the Solr index . Suppose 
> for my system, I have a document that has been indexed, now its newer version 
> is into use, so I want to use the latest one, for that I want the previous 
> one to be deleted from the index.
> Kindly help me a way out !
> I went through many articles and blogs, got the way (methods) for deleting , 
> but not actually, how to do it, because it's not possible to delete every 
> time by passing id's in around 50,000 doc system.
> Please suggest!
> 
> 
> 
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. WARNING: Computer viruses can be transmitted via 
> email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus/trojan/worms/malicious code transmitted by this email. 
> www.motherson.com


Delete documents from the Solr index using SolrJ

2019-11-04 Thread Khare, Kushal (MIND)
Hello mates!
I want to know how we can delete the documents from the Solr index . Suppose 
for my system, I have a document that has been indexed, now its newer version 
is into use, so I want to use the latest one, for that I want the previous one 
to be deleted from the index.
Kindly help me a way out !
I went through many articles and blogs, got the way (methods) for deleting , 
but not actually, how to do it, because it's not possible to delete every time 
by passing id's in around 50,000 doc system.
Please suggest!



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any 
virus/trojan/worms/malicious code transmitted by this email. www.motherson.com