Which make it kinda hard to filter by query on exact match…
Lets say country is stored as “Norway”.
Then query needs to be ‘data.country.name = “Norway”’
But aggregation country returns ‘norway’
So if I use the aggregation to build filter dropdowns on the website, I must somehow know that ‘norway’ means ‘Norway’.
I guess I could work around if by doing ‘data.country.name like “norway”’
But I also localize “Norway” to “Norge”. (using my own js structure built from a phrase contenttype)
And again ‘norway’ !== ‘Norway’;
I guess as long as people are involved I should suspect that any content field has inconsistencies in case.
In this instance data.country.name is populated via the content api.
So I could store values in lowercase.
I could also add a config regexp to the TextLine input which only accepts lowercase chars.
There might be future usecases where case sensitivity matters.
It should at least be documented that aggregations are case insensitive and returns lowercase version of whatever was stored.
But really should it not be possible to do case sensitive aggregations?
Well, do you want “Norway” and “norway” as different entities when aggregating on user defined tags?
Its a tradeoff between ensuring that you dont need to know the case when searching/aggregating and this issue. We have discussed the possibility to store a raw value also, but its not obvious how to solve every scenario.
The values are the aggregations from content in XP.
Thus not unlimited number of items, but varying depending on synced data.
The reason I sync the data instead of using the external API directly is I want a common interface to sort and filter. The part will be used for more than that API. It’s already used for manually added content in XP.
Funny, I wanted to ask the same question as I currently also have this issue
My use case is the following:
I am working on an headless application in React using graphQL.
My content contains a Tag-Property. So I am workimg on a TagInputcomponent.
In Contentstudio I get the suggestions for tags as entered before (without lowercase!).
I also use term-aggregation to fetch the tags.
How did you implement this in Content-Studio ?? (or how do you fetch the data from repo?)