[KinoSearch] Index cleared when using add_doc, delete_by_term, et al.

Marvin Humphrey marvin at rectangular.com
Tue Mar 31 18:07:40 PDT 2009


On Tue, Mar 31, 2009 at 08:59:40PM -0400, Darian Anthony Patrick wrote:

> $invindexer->delete_by_term(
> 	'listing_id' => $listing{'listing_id'}
> );

> to create the new entry.  I do this in a loop over all entries in the 
> RSS feed.  I'm seeing behavior where occasionally my entire index gets 
> totally blown away with only entries created during the current 
> invocation of my indexing script existing in the index.

What's the analyzer for the listing_id field?  My immediate guess is that
there's a stemmer involved that's normalizing the listing_id and so that the
delete hits multiple entries instead of just one.

> Is this a known issue?  Is this what "Fix delete_by_term behavior after 
> add_doc is called in InvIndexer" means on 

That's something else.  It's that when you do this...

  $invindexer->add_doc( { content => 'foo' } );
  $invindexer->delete_by_term( content => 'foo' );
  $invindexer->finish;

... the doc you just added doesn't get deleted.

Marvin Humphrey




More information about the kinosearch mailing list