
|
If you were logged in you would be able to see more operations.
|
|
Given an index other than spoc, the computation of the score for a pattern with object != NativeValue.UNKNOWN_ID and context == NativeValue.UNKNOWN_ID is computed incorrectly.
In TripleStore$TripleIndex.getPatternScore(int s, int p, int o, int c), the case block for object ('o') is missing a break. When the 'o' field of the index specification string is reached, and if object is != NativeValue.UNKNOWN_ID, then the score is incremented and the context block is entered. If context is == NativeValue.UNKNOWN_ID, computation ends here, though a char other than 'c' might be the next one in the array. This is not what you would expect.
Simply add the break.
|
|
Updated issue title.
The algorithm fails whenever an object is specified and all the previous fields are matched by the index. This can even affect the score for the 'spoc' index.
Added the missing breaks, also added a default clause to catch invalid field characters.
|
|