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.


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


      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.


        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


            Andrea Andrea Langeli created issue -
            Andrea Andrea Langeli made changes -
            Field Original Value New Value
            Attachment Approach_1.java [ 10592 ]
            Attachment Approach_2.java [ 10593 ]
            Attachment Approach_3.java [ 10594 ]
            craigm Craig Macdonald made changes -
            Link This issue duplicates TR-444 [ TR-444 ]
            craigm Craig Macdonald made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]


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


                • Created: