incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goran kent <gorank...@gmail.com>
Subject Re: [lucy-user] Replacing a document in an index
Date Sat, 22 Oct 2011 17:32:35 GMT
On Sat, Oct 22, 2011 at 1:34 PM, Marvin Humphrey <marvin@rectangular.com> wrote:
> On Fri, Oct 21, 2011 at 08:21:20PM +0200, goran kent wrote:
>> Can I delete doc/add doc (in effect replacing) in one go?:
>>
>> my $index = Lucy::Index::Indexer->new(...create=>0...);
>> # delete existing:
>> $index->delete_by_term(field=>'docid', term=>$docid);
>> # add new:
>> $index->add_doc($doc);
>> $index->commit;
>
> Yes that works.

excellent, thanks

Mime
View raw message