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

getNumberOfTokens of the class UpdatingCollectionStatistics gives back the number of pointers instead of the number of tokens.

    Details

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

      Description

      There is a bug in the method getNumberOfTokens of the class UpdatingCollectionStatistics within the Index class. This method returns the value associated with the property "num.Pointers" instead of the one related to "num.Tokens". This originates a problem when IndexOnDisk objects are merged to create a new index: its Properties object indicates a number of tokens smaller than the right one, hence the average document length of the collection documents turns out to be wrong.
      I upload the patched Java class.

        Attachments

        1. Approach_1.java
          2 kB
        2. Approach_2.java
          2 kB
        3. Approach_3.java
          2 kB
        4. Index.java
          15 kB

          Issue Links

            Activity

              People

              • Assignee:
                craigm Craig Macdonald
                Reporter:
                Andrea Andrea Langeli
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: