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

Posting.getDocumentLength() does not work for postings from the direct file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.5
    • Component/s: .structures
    • Labels:
      None

      Description

      The following code raises an error when WeightingModel.score(Posting) is called, as a posting retrieved from the direct file apparently does not encapsulate the document length appropriately.

      WeightingModel wm = new BM25();

      DocumentIndex document = index.getDirectIndex();
      DocumentIndexEntry de = document.getDocumentEntry(docid);
      IterablePosting ip = direct.getPostings(de);

      double score = 0;
      while (ip.next()) {
          score += wm.score(ip);
      }

        Attachments

          Activity

            People

            • Assignee:
              rodrygo Rodrygo L. T. Santos
              Reporter:
              rodrygo Rodrygo L. T. Santos
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: