Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6898

Avoid reading last stored field value when StoredFieldVisitor.Status.NO

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.4
    • core/codecs
    • None
    • New

    Description

      CompressingStoredFieldsReader.visitDocument (line 597) loops through the fields in the input while consulting the StoredFieldVisitor on what to do. There is a small optimization that could be done on the last loop iteration. If the visitor returns Status.NO then it should be treated as equivalent to Status.STOP. As it is now, it will call skipField() which reads needless bytes from the DataInput that won't be used.

      With this optimization in place, it is advisable to put the largest text field last in sequence – something the user or search platform (e.g. ES/Solr) could do.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment