Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUCENE-10584: Properly support #getSpecificValue for hierarchical dims in SSDV faceting #929

Merged
merged 4 commits into from
Jun 15, 2022

Conversation

gsmiller
Copy link
Contributor

Description (or a Jira issue link if you have one)

Please see: LUCENE-10584

@gsmiller
Copy link
Contributor Author

@mdmarshmallow - might be a good one for you to have a look at when you get a minute. Pretty simple change but you've got a lot of context since you added hierarchical dim support to SSDV facets (thanks again!).

@@ -74,7 +74,7 @@ public FacetResult getTopChildren(int topN, String dim, String... path) throws I

@Override
public Number getSpecificValue(String dim, String... path) throws IOException {
if (path.length != 1) {
if (stateConfig.getDimConfig(dim).hierarchical == false && path.length != 1) {
throw new IllegalArgumentException("path must be length=1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should update this error message? Something like dim + "is not configured to be hierarchical, path must be length=1".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! Pushed a rev.

Copy link
Contributor

@mdmarshmallow mdmarshmallow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

@gsmiller
Copy link
Contributor Author

Thanks @mdmarshmallow!

@gsmiller gsmiller merged commit 0b5e0bf into apache:main Jun 15, 2022
@gsmiller gsmiller deleted the LUCENE-10584-ssdv-getspecificvalue branch June 15, 2022 18:31
shaie pushed a commit to mdmarshmallow/lucene that referenced this pull request Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants