lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: BlockJoinQuery: delete documents
Date Sun, 03 Mar 2013 15:39:59 GMT
IndexWriter doesn't track the blocks ... so you need to something yourself.

One approach is to add a Field, eg blockID, with the same value (maybe
the id of the parent doc) to parent and child docs, and then delete by

You may also get away with just deleting the parent or just the
children, but this can make searches more costly as the parent/child
docs will be matched only to then discover that they don't join to

Mike McCandless

On Sat, Mar 2, 2013 at 11:34 PM, Wei Wang <> wrote:
> Hello,
> I understand BlockJoinQuery can be used to index nested documents with
> some internal structure. And at indexing time, addDocuments is used to
> create document blocks.
> In case we would like to update some data fields, we have to delete
> the old document block and add the updated block. How can we delete
> the old document block efficiently? It seems IndexWriter does not
> track these blocks.
> Thanks,
> Wei
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message