Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-338

Issue in class Inverted2DirectIndexBuilder

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: .indexing
    • Labels:
      None

      Description

      In order to avoid array bound exceptions occurring when the inverted2direct.processtokens property is set to a small number,
      the private method traverseInvertedFile(...) should change the lines:

      if (docid == IterablePosting.EOL)
      continue;

      with the lines:

      if (docid > lastDocid || docid == IterablePosting.EOL)
      continue;

      (to be clear, just before the do...while loop)

      For example, if I get only first 6 docs, with docids ranging from 0 to 5, to scan from scanDocumentIndexForTokens(), and the first docid of the first posting list scanned is 45, when accessing the prevUse boolean array I'll end up out of the array.

        Attachments

          Issue Links

            Activity

            Hide
            craigm Craig Macdonald added a comment -

            I just fixed this in TR-344, along with some other necessary fixes, including better unit tests. Good catch Nic.

            Craig

            Show
            craigm Craig Macdonald added a comment - I just fixed this in TR-344 , along with some other necessary fixes, including better unit tests. Good catch Nic. Craig
            Hide
            craigm Craig Macdonald added a comment -

            dup

            Show
            craigm Craig Macdonald added a comment - dup

              People

              • Assignee:
                craigm Craig Macdonald
                Reporter:
                nicola.tonellotto Nicola Tonellotto
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: