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 kiwi clive <ki...@yahoo.com> on 2012/03/22 15:50:56 UTC
BlockJoinQuery Clarification
Hello
I've been looking at the BlockJoinQuery in Lucene 3.4.0 and would like to clarify my understanding.
Suppose we have a parent document that we index with (say) 4 child documents. My understanding is that these go in as an atomic unit and allows us to query and join across the documents.
Now what say I wanted to update one of the child documents (only). If the child document was update with a standard update, I presume the join to the parent is broken. If I update using a Collection, is it necessary to reindex all of the documents (4 children + pareent).
And finally, if I updated one child using a collection with the parent, would both of these documents require reindexing and loose their affinity with other children ?
Thanks,
C,
Re: BlockJoinQuery Clarification
Posted by Michael McCandless <lu...@mikemccandless.com>.
Open an IndexWriter with OpenMode.CREATE, or call
IndexWriter.deleteAll on an already open IndexWriter.
Mike McCandless
http://blog.mikemccandless.com
On Thu, Aug 2, 2012 at 4:28 PM, developer3459 <de...@gmail.com> wrote:
> Is there an quick/easy way to delete the entire collection at once? Im
> looking to delete and replace the entire collection in one fell swoop.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-Clarification-tp3848728p3998902.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: BlockJoinQuery Clarification
Posted by developer3459 <de...@gmail.com>.
Is there an quick/easy way to delete the entire collection at once? Im
looking to delete and replace the entire collection in one fell swoop.
--
View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-Clarification-tp3848728p3998902.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: BlockJoinQuery Clarification
Posted by Michael McCandless <lu...@mikemccandless.com>.
You must delete all children when you delete the parent.
I believe you can delete individual children and leave the parent undeleted.
Mike McCandless
http://blog.mikemccandless.com
On Thu, Aug 2, 2012 at 4:03 PM, developer3459 <de...@gmail.com> wrote:
>
> Is there a way to delete a parent doc from the collection, or delete a child
> doc from the collection? If so, will deleting the parent doc of a collection
> orphan the associated child docs or will they automatically be deleted as
> well?
>
> thanks
> -D
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-Clarification-tp3848728p3998891.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: BlockJoinQuery Clarification
Posted by developer3459 <de...@gmail.com>.
Is there a way to delete a parent doc from the collection, or delete a child
doc from the collection? If so, will deleting the parent doc of a collection
orphan the associated child docs or will they automatically be deleted as
well?
thanks
-D
--
View this message in context: http://lucene.472066.n3.nabble.com/BlockJoinQuery-Clarification-tp3848728p3998891.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
Re: BlockJoinQuery Clarification
Posted by Michael McCandless <lu...@mikemccandless.com>.
You have to replace all documents in the block (1 parent, 4 children
in your example) to update any of the documents... only updating the
child (or child + parent) will break the join...
There's also query-time joining coming in 3.6.0.
Mike McCandless
http://blog.mikemccandless.com
On Thu, Mar 22, 2012 at 10:50 AM, kiwi clive <ki...@yahoo.com> wrote:
> Hello
>
> I've been looking at the BlockJoinQuery in Lucene 3.4.0 and would like to clarify my understanding.
>
> Suppose we have a parent document that we index with (say) 4 child documents. My understanding is that these go in as an atomic unit and allows us to query and join across the documents.
>
> Now what say I wanted to update one of the child documents (only). If the child document was update with a standard update, I presume the join to the parent is broken. If I update using a Collection, is it necessary to reindex all of the documents (4 children + pareent).
>
> And finally, if I updated one child using a collection with the parent, would both of these documents require reindexing and loose their affinity with other children ?
>
> Thanks,
> C,
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org