[Xapian-discuss] Re: [Xapian-devel] Usage with PHP

Arjen van der Meijden acmmailing at tweakers.net
Mon Jul 25 12:40:09 BST 2005


James Aylett wrote:
> On Sun, Jul 24, 2005 at 04:37:47PM -0400, Jacob Mahoney wrote:
> 
>> Yes, whenever someone decides to edit their post (or I as the admin need
>> to edit a post), the original search keywords for that particular post,
>> and replaced with the new modified post.  That's how phpBB works.  I'll
>> try the bindings to see if they work anyway.  The only thing that may be
>> cumbersome is adding 9000+ posts to the Xapian search system, and
>> automatically removing them from the search system during forum pruning
>> (yes, one of the forms on my site has auto-pruning enabled).
> 
> Pruning may be harder - replacing documents can be handled by
> scriptindex, if you make its unique term be the integer primary key of
> the post table. scriptindex will also make it easier to add the
> initial 9000 posts into the Xapian database.

If the ones which will be pruned are known (and they should be), 
scriptindex can be used for this as well. Just generate a similar text 
(file), but with only the identification of the document. When the rest 
is left out, scriptindex assumes it has to delete the record, and thus 
it can also be used as a batch-deleter.
The same goes for any form of updating; If you keep track when the last 
update was done, you could select all documents that have changed since 
than and update them. At least thats how we use it. We don't really 
delete any forum-topics though, we just mark it as being hidden if we 
"delete" it.

Best regards,

Arjen



More information about the Xapian-discuss mailing list