Skip to content

Facet search array of objects #4461

Answered by Kerollmops
rauldeheer asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @rauldeheer 👋

I understand your issue a little bit, but only some things. It seems to be related to this one in some way where a user wants to filter documents by using multiple fields of an object inside the main document.

Facets seem to be perfect. We don't need hits so we just set the hitsPerPage on 0 and for the facetName we select tags. Now this works, but it just doesn't return anything.

That's what made me think about the above issue. Meilisearch flattens the subobjects in a document. It's like the objects in tags see their fields explode and an array of the values lives in dedicated tags.type or tags.value fields.

tags = [{ type: CURRENCY, value: EUR }, { type: PLATFORM, value

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rauldeheer
Comment options

@Kerollmops
Comment options

@rauldeheer
Comment options

Answer selected by rauldeheer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants