Open
Description
This issue has been filed to evaluate modifying the Builder withMapping(List<Integer> mapping)
API, so that it does not require to reify a concrete list of map ids.
For example:
List<Integer> map =...
var query = new CagraQuery.Builder()
.withMapping(map)
From my understanding a function of int -> int
is sufficient. Maybe an additional size()
. For Lucene this would work better than reifying the ordinal to doc mapping as a list.
e.g.
Builder withMapping(MappingFunction ordToDocFunc)
@FunctionalInterface
public interface MappingFunction {
/** The given a vector ordinal returns a docId */
int apply(int value);
int size(); // if needed
}
Metadata
Assignees
Labels
No labels
Activity