[TR-178] Private method setPostingImplementation in BitPostingIndex Created: 01/Sep/11  Updated: 13/Apr/12  Resolved: 13/Apr/12

Status: Resolved
Project: Terrier Core
Component/s: .structures
Affects Version/s: 3.5
Fix Version/s: 3.6

Type: Bug Priority: Minor
Reporter: Nicola Tonellotto Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None

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.

Comment by Craig Macdonald [ 13/Apr/12 ]

Trivial fix: committed for 3.6

Generated at Wed Dec 12 14:37:57 GMT 2018 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.