Lucene - Core
  1. Lucene - Core
  2. LUCENE-3112

Add IW.add/updateDocuments to support nested documents

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I think nested documents (LUCENE-2454) is a very compelling addition
      to Lucene. It's also a popular (many votes) issue.

      Beyond supporting nested document querying, which is already an
      incredible addition since it preserves the relational model on
      indexing normalized content (eg, DB tables, XML docs), LUCENE-2454
      should also enable speedups in grouping implementation when you group
      by a nested field.

      For the same reason, it can also enable very fast post-group facet
      counting impl (LUCENE-3097) when you what to
      count(distinct(nestedField)), instead of unique documents, as your
      "identifier". I expect many apps that use faceting need this ability
      (to count(distinct(nestedField)) not distinct(docID)).

      To support these use cases, I believe the only core change needed is
      the ability to atomically add or update multiple documents, which you
      cannot do today since in between add/updateDocument calls a flush (eg
      due to commit or getReader()) could occur.

      This new API (addDocuments(Iterable<Document>), updateDocuments(Term
      delTerm, Iterable<Document>) would also further guarantee that the
      documents are assigned sequential docIDs in the order the iterator
      provided them, and that the docIDs all reside in one segment.

      Segment merging never splits segments apart, so this invariant would
      hold even as merges/optimizes take place.

      1. LUCENE-3112.patch
        42 kB
        Michael McCandless
      2. LUCENE-3112.patch
        12 kB
        Michael McCandless

        Issue Links

          Activity

          Michael McCandless created issue -
          Michael McCandless made changes -
          Field Original Value New Value
          Attachment LUCENE-3112.patch [ 12479448 ]
          Michael McCandless made changes -
          Attachment LUCENE-3112.patch [ 12479768 ]
          Michael McCandless made changes -
          Link This issue blocks LUCENE-3129 [ LUCENE-3129 ]
          Michael McCandless made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Robert Muir made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Michael McCandless
              Reporter:
              Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development