shaie commented on PR #841: URL: https://github.com/apache/lucene/pull/841#issuecomment-1141152098
Hey @mdmarshmallow I think this is a great and very useful feature. I also believe that in general it will be good to accompany these changes with a demo `main()` in the `demo` package, but it can wait a bit until we have a solid API. I've added to this PR an `.adoc` with few example use cases. IMO it will be useful to keep it around, but modify it of course per the feedback we receive, as a documentation of this feature. If for some reason we'd think that this document is redundant / will be hard to maintain and we'll want to stick with javadocs, I don't mind if in the end we'll delete it. For now I think it's a convenient place to document our thoughts, examples and APIs. I used the term `FacetSets` to denote "a set of values that go together". Other names may include `Tuple`, `Group` etc. I know naming is the hardest part :). In my mind I'm also thinking about an API like: ``` doc.add(new FacetSetsField( "actorAwards, // A Thriller for which this actor received a Best Actor Oscar award in 2022 new FacetSet(ord("Oscar"), ord("Best Actor"), ord("Thriller"), 2022), // A Drama for which this actor received a Best Supporting Actor Emmy award in 2005 new FacetSet(ord("Emmy"), ord("Best Supporting Actor"), ord("Drama"), 2005), )); ``` Yes, it could be just sugar API on top of `HyperRectangle` but perhaps from a faceting perspective might make more sense and consistent with the other faceting API (`RangeFacets`, `SSDVFacetField` etc.). I'd love to receive feedback on the use cases. I can also add to the document a more-than-pseudocode-like example which will include the indexing and aggregation API, so we have something more concrete to discuss? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org