As pointed out by Rob in the issue I would also suggest to start with the simple > separate-numeric-docvalues-fields case and use similar logic as the > org.apache.lucene.facet.range package, just on 2-D, or maybe 3-D, N-D, etc
I think that's a preferable solution to me, because: 1. It does not couple the dimensions together so that people can combine them freely 2. It might be able to be compressed better Best On Tue, May 24, 2022 at 9:08 AM Marc D'Mello <marcd2...@gmail.com> wrote: > Hi, > > Thanks for the responses! For Patrick's question, right now in faceting we > don't have any good way to AND between two fields. I think the original > hyper rectangle issue has a good example of a use case: > https://issues.apache.org/jira/browse/LUCENE-10274. > > As for Robert's point, this feature would also allow us to use > MultiRangeQuery in IndexOrDocValuesQuery, but MultiRangeQuery is itself in > the sandbox module so I'm assuming that's a pretty exotic use case as well. > I personally have no issues using BinaryDocValues for this, I was just > wondering if it would be better to create a dedicated doc values, but it > seems that is not that case. > > Thanks, > Marc > > On Tue, May 24, 2022 at 1:27 AM Robert Muir <rcm...@gmail.com> wrote: > >> This seems really exotic feature to add a dedicated docvalues field for. >> >> We should let BINARY be the catchall for stuff like this. >> >> On Mon, May 23, 2022 at 10:17 PM Marc D'Mello <marcd2...@gmail.com> >> wrote: >> > >> > Hi, >> > >> > Some background: I've been working on this PR to add hyper rectangle >> faceting 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. 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! >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> >>