add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / join / src / java / org / apache / lucene / search / join / package.html
1 <html>
2 <body>
3
4 <p>This module supports index-time joins while searching, where joined
5   documents are indexed as a single document block using
6   {@link org.apache.lucene.index.IndexWriter#addDocuments}.  This is useful for any normalized content (XML documents or database tables).  In database terms, all rows for all
7   joined tables matching a single row of the primary table must be
8   indexed as a single document block, with the parent document
9   being last in the group.</p>
10
11 <p>When you index in this way, the documents in your index are divided
12   into parent documents (the last document of each block) and child
13   documents (all others).  You provide a {@link org.apache.lucene.search.Filter} that identifies the
14   parent documents, as Lucene does not currently record any information
15   about doc blocks.</p>
16
17 <p>At search time, use {@link org.apache.lucene.search.join.BlockJoinQuery} to remap
18   matches from any child {@link org.apache.lucene.search.Query} (ie, a query that matches only
19   child documents) up to the parent document space.  The resulting
20   {@link org.apache.lucene.search.join.BlockJoinQuery} can then be used as a clause in any query that
21   matches parent documents.</p>
22
23 <p>If you only care about the parent documents matching the query, you
24   can use any collector to collect the parent hits, but if you'd also
25   like to see which child documents match for each parent document,
26   use the {@link org.apache.lucene.search.join.BlockJoinCollector} to collect the hits. Once the
27   search is done, you retrieve a {@link
28   org.apache.lucene.search.grouping.TopGroups} instance from the
29   {@link org.apache.lucene.search.join.BlockJoinCollector#getTopGroups} method.</p>
30
31 </body>
32 </html>