Hi Marc Thank you for starting the discussion, I think all your points make sense, but I'm wondering if we really need everything packed into one field? And what are the advantages of doing that? I *think* most of the facet related use cases can be satisfied using multiple fields, one field per dimension. And for use cases outside of the facet world, I'm not sure how could multiple dimensions packed in one field be more useful than each dimension having its own field?
Best Patrick On Mon, May 23, 2022 at 7:17 PM Marc D'Mello <marcd2...@gmail.com> wrote: > Hi, > > Some background: I've been working on this PR to add hyper > rectangle faceting <https://github.com/apache/lucene/pull/841> > capabilities to Lucene facets and I needed to create a new doc values field > to support this feature. Initially, I had a field that just extended > BinaryDocValues, but then a discussion came up about whether to add a > completely new DocValues field, maybe something like PointDocValuesField > (and SortedPointDocValuesField as the multivalued version) to add first > class support for this new field. Here is the link to the discussion > <https://github.com/apache/lucene/pull/841#discussion_r879869751>. I > think there are a few benefits to this: > > - Formalize how we would store points as doc values rather than just > packing points into a BinaryDocValues field in a format that could change > at any time > - NumericDocValues enables us to create a SortedNumericDocValuesRange > query which can be used with IndexOrDocValuesQuery to make some range > queries more efficient. Adding this new doc values field would let us do > the same thing with higher dimensional ranges > > I'm sure I could be missing some benefits, and I also am not super > experienced with Lucene so there could be drawbacks I am missing as well > :). From what I understand though, Lucene doesn't have a lot of DocValues > fields and there should be some thought put into adding new ones, so I was > wondering if I could get some feedback about the idea. Thanks! >