Yelp / nrtsearch

A high performance gRPC server on top of Apache Lucene
Apache License 2.0
270 stars 40 forks source link

Generics for doc value object types #745

Closed aprudhomme closed 1 month ago

aprudhomme commented 1 month ago

Modifies IndexableFieldDef to have a generic type parameter for doc values. Instances provide a concrete class object during construction. This allows use of the type information at runtime.

Having type information available will make it possible do typed aggregations in a cleaner, more generic way.

As part of this work, I also made the VectorFieldDef abstract. There are now independent implementations for float and byte vector types. The diffs look ugly, but it is mainly just moving the functions around.