You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by VIGNESH S <vi...@gmail.com> on 2013/11/29 07:00:55 UTC

Deletion of Index not happening in Lucene 4.3

Hi,

I try deleting the document from the Index like below.It is working in case
of Lucene 3.6.But document is not getting deleted  for Lucene 4.3


Term term = new Term("path", value);

mWriter.deleteDocuments(term);
mWriter.commit();

Please kindly help..
-- 
Thanks and Regards
Vignesh Srinivasan

Re: Deletion of Index not happening in Lucene 4.3

Posted by Erick Erickson <er...@gmail.com>.
Bah. "open a new writer" should be
"open a new seacher"


On Fri, Nov 29, 2013 at 8:36 AM, Erick Erickson <er...@gmail.com>wrote:

> Did you open a new writer to search with?
>
> Erick
>
>
> On Fri, Nov 29, 2013 at 6:23 AM, VIGNESH S <vi...@gmail.com>wrote:
>
>> Hi,
>>
>> I searched the word again and document is appearing and iam getting the
>> hit
>>
>>
>> On Fri, Nov 29, 2013 at 4:26 PM, Ian Lea <ia...@gmail.com> wrote:
>>
>> > How do you know it's not working?  My favourite suggestion: post a
>> > very small self-contained RAMDirectory based program or test case, or
>> > maybe 2 in this case, for 3.6 and 4.3, that demonstrates the problem.
>> >
>> >
>> > --
>> > Ian.
>> >
>> >
>> > On Fri, Nov 29, 2013 at 6:00 AM, VIGNESH S <vi...@gmail.com>
>> > wrote:
>> > > Hi,
>> > >
>> > > I try deleting the document from the Index like below.It is working in
>> > case
>> > > of Lucene 3.6.But document is not getting deleted  for Lucene 4.3
>> > >
>> > >
>> > > Term term = new Term("path", value);
>> > >
>> > > mWriter.deleteDocuments(term);
>> > > mWriter.commit();
>> > >
>> > > Please kindly help..
>> > > --
>> > > Thanks and Regards
>> > > Vignesh Srinivasan
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>>
>>
>> --
>> Thanks and Regards
>> Vignesh Srinivasan
>> 9739135640
>>
>
>

Re: Deletion of Index not happening in Lucene 4.3

Posted by Erick Erickson <er...@gmail.com>.
Did you open a new writer to search with?

Erick


On Fri, Nov 29, 2013 at 6:23 AM, VIGNESH S <vi...@gmail.com> wrote:

> Hi,
>
> I searched the word again and document is appearing and iam getting the hit
>
>
> On Fri, Nov 29, 2013 at 4:26 PM, Ian Lea <ia...@gmail.com> wrote:
>
> > How do you know it's not working?  My favourite suggestion: post a
> > very small self-contained RAMDirectory based program or test case, or
> > maybe 2 in this case, for 3.6 and 4.3, that demonstrates the problem.
> >
> >
> > --
> > Ian.
> >
> >
> > On Fri, Nov 29, 2013 at 6:00 AM, VIGNESH S <vi...@gmail.com>
> > wrote:
> > > Hi,
> > >
> > > I try deleting the document from the Index like below.It is working in
> > case
> > > of Lucene 3.6.But document is not getting deleted  for Lucene 4.3
> > >
> > >
> > > Term term = new Term("path", value);
> > >
> > > mWriter.deleteDocuments(term);
> > > mWriter.commit();
> > >
> > > Please kindly help..
> > > --
> > > Thanks and Regards
> > > Vignesh Srinivasan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> --
> Thanks and Regards
> Vignesh Srinivasan
> 9739135640
>

Re: Deletion of Index not happening in Lucene 4.3

Posted by VIGNESH S <vi...@gmail.com>.
Hi,

I searched the word again and document is appearing and iam getting the hit


On Fri, Nov 29, 2013 at 4:26 PM, Ian Lea <ia...@gmail.com> wrote:

> How do you know it's not working?  My favourite suggestion: post a
> very small self-contained RAMDirectory based program or test case, or
> maybe 2 in this case, for 3.6 and 4.3, that demonstrates the problem.
>
>
> --
> Ian.
>
>
> On Fri, Nov 29, 2013 at 6:00 AM, VIGNESH S <vi...@gmail.com>
> wrote:
> > Hi,
> >
> > I try deleting the document from the Index like below.It is working in
> case
> > of Lucene 3.6.But document is not getting deleted  for Lucene 4.3
> >
> >
> > Term term = new Term("path", value);
> >
> > mWriter.deleteDocuments(term);
> > mWriter.commit();
> >
> > Please kindly help..
> > --
> > Thanks and Regards
> > Vignesh Srinivasan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Thanks and Regards
Vignesh Srinivasan
9739135640

Re: Deletion of Index not happening in Lucene 4.3

Posted by Ian Lea <ia...@gmail.com>.
How do you know it's not working?  My favourite suggestion: post a
very small self-contained RAMDirectory based program or test case, or
maybe 2 in this case, for 3.6 and 4.3, that demonstrates the problem.


--
Ian.


On Fri, Nov 29, 2013 at 6:00 AM, VIGNESH S <vi...@gmail.com> wrote:
> Hi,
>
> I try deleting the document from the Index like below.It is working in case
> of Lucene 3.6.But document is not getting deleted  for Lucene 4.3
>
>
> Term term = new Term("path", value);
>
> mWriter.deleteDocuments(term);
> mWriter.commit();
>
> Please kindly help..
> --
> Thanks and Regards
> Vignesh Srinivasan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org