Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

BlockJoinQuery Clarification

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


kiwi_clive at yahoo

Mar 22, 2012, 7:50 AM

Post #1 of 6 (339 views)
Permalink
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,


lucene at mikemccandless

Mar 22, 2012, 8:02 AM

Post #2 of 6 (328 views)
Permalink
Re: BlockJoinQuery Clarification [In reply to]

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 <kiwi_clive [at] yahoo> 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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


developer3459 at gmail

Aug 2, 2012, 1:03 PM

Post #3 of 6 (240 views)
Permalink
Re: BlockJoinQuery Clarification [In reply to]

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.


lucene at mikemccandless

Aug 2, 2012, 1:06 PM

Post #4 of 6 (240 views)
Permalink
Re: BlockJoinQuery Clarification [In reply to]

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 <developer3459 [at] gmail> 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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


developer3459 at gmail

Aug 2, 2012, 1:28 PM

Post #5 of 6 (236 views)
Permalink
Re: BlockJoinQuery Clarification [In reply to]

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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


lucene at mikemccandless

Aug 2, 2012, 2:48 PM

Post #6 of 6 (243 views)
Permalink
Re: BlockJoinQuery Clarification [In reply to]

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 <developer3459 [at] gmail> 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 [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.