Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.2
-
None
-
Linux openSUSE 10.2
Description
It is not possible to use the FSIndex.find() method when the indexing strategy is a SET.
A java.lang.ClassCastException is thrown.
For example:
FSIndex idx = aJCas.getJFSIndexRepository().getIndex("idx_SET");
while (doSomething) {
MyFeatureStructure myFs = new MyFeatureStructure(aJCas);
myFs.setMyFeature(value);
myFs.addToIndexes();
// Try to recover from index
MyFeatureStructure otherFs = (MyFeatureStructure)idx.find(myFs); // ClassCastException !!!!
...
}