Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6726

Use addDocument instead of updateDocument while reindexing with Lucene

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.7.9, 1.8.0
    • lucene
    • None

    Description

      Currently the DefaultIndexWriter uses updateDocument while adding/updating document in index. This is fine for incremental indexing where we cannot be sure if index already has that entry. This call first does a search for existing document matching the term and then deletes and add the new document

      However for reindex case where we start from empty index we can use addDocument. This avoids the extra work for search

      In test where index had ~70M entries switch to addDocument resulted in 10 min reduction in reindexing timings

      Attachments

        Activity

          People

            chetanm Chetan Mehrotra
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: