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

Facet summary of empty collection returns internal error #339

Closed
lukashornych opened this issue Nov 22, 2023 · 1 comment · Fixed by #367
Closed

Facet summary of empty collection returns internal error #339

lukashornych opened this issue Nov 22, 2023 · 1 comment · Fixed by #367
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lukashornych
Copy link
Collaborator

When facet summary of certain reference that references empty collection AND the facet statistics are filtered, the evitaDB returns

Global index of entity {collection name} unexpectedly not found!

Minimal example query is this:

{
    queryProduct{
        extraResults {
            facetSummary {
                groups {
                    facetStatistics(filterBy: {
                        referenceTagsHaving: {
                            entityHaving: {
                                attributeCodeEquals: "COLLECTION_GROUP"
                            }
                        }
                    }) {
                        facetEntity {
                            primaryKey
                            attributes {
                                name
                                url
                                description
                            }
                        }
                    }
                }
            }
        }
    }
}

I understand why it throws this error but I think it should return empty facet statistics like it does without the filter.

@lukashornych lukashornych added this to the Alpha milestone Nov 22, 2023
@lukashornych lukashornych added the bug Something isn't working label Nov 22, 2023
@novoj
Copy link
Collaborator

novoj commented Dec 5, 2023

@lukashornych I've added test io.evitadb.api.EntityByFacetFilteringFunctionalTest#shouldReturnEmptyFacetSummaryForEmptyCollection, but I cannot reproduce the described behaviour. See related branch.

Does this situation still occur in current version?

lukashornych added a commit that referenced this issue Dec 7, 2023
@novoj novoj linked a pull request Dec 7, 2023 that will close this issue
@novoj novoj closed this as completed in #367 Dec 7, 2023
novoj added a commit that referenced this issue Dec 7, 2023
…lection-returns-internal-error

#339 facet summary of empty collection returns internal error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants