Terrier Core

Private method setPostingImplementation in BitPostingIndex

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 3.5
  • Fix Version/s: 3.6
  • Component/s: .structures
  • Description:
    Hide
    The private method setPostingImplementation in BitPostingIndex has been introduced in Terrier 3.5. In this method, the IterablePosting implementation constructor is "preloaded". In Terrier 3.0, it was "obtained directly in the public getPostings method.
    Now it is impossible to overload the setPostingImplementation method, then the aforementioned constructor is "hard coded" in terms of parameters:

    postingConstructor = (fieldCount > 0)
    ? postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class, Integer.TYPE)
    : postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class);

    If someone provides a new implementation of IterablePosting (e.g., using skips) with a different constructor signature, now it is impossible to obtain that constructor because of reflection issues.
    Show
    The private method setPostingImplementation in BitPostingIndex has been introduced in Terrier 3.5. In this method, the IterablePosting implementation constructor is "preloaded". In Terrier 3.0, it was "obtained directly in the public getPostings method. Now it is impossible to overload the setPostingImplementation method, then the aforementioned constructor is "hard coded" in terms of parameters: postingConstructor = (fieldCount > 0) ? postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class, Integer.TYPE) : postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class); If someone provides a new implementation of IterablePosting (e.g., using skips) with a different constructor signature, now it is impossible to obtain that constructor because of reflection issues.

Activity

Hide
Craig Macdonald added a comment - 13/Apr/12 6:42 PM

Trivial fix: committed for 3.6

Show
Craig Macdonald added a comment - 13/Apr/12 6:42 PM Trivial fix: committed for 3.6

People

Dates

  • Created:
    01/Sep/11 5:18 PM
    Updated:
    13/Apr/12 6:42 PM
    Resolved:
    13/Apr/12 6:42 PM