-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Description
After selecting a collection to index, you can select the fields in the collection to filter.
Basic example
For example, with this ‘posts’ collection.
Once indexed, I would like to have a ‘filter’ submenu with the attributes of the collection that I could check.
Once the submenu is expanded, I can check the slug attribute in the categories element.
After that, if I run this query:
GET http://localhost:7700/indexes/post/settings/filterable-attributes
it will give me this:
[
"categories.slug"
]The collection schema:
{
"kind": "collectionType",
"collectionName": "posts",
"info": {
"singularName": "post",
"pluralName": "posts",
"displayName": "Post"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"..."
"categories": {
"type": "relation",
"relation": "manyToMany",
"target": "api::category.category",
"mappedBy": "posts"
},
"..."
}{
"kind": "collectionType",
"collectionName": "categories",
"info": {
"singularName": "category",
"pluralName": "categories",
"displayName": "Category"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"name": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"minLength": 3,
"required": true
},
"slug": {
"type": "uid",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"targetField": "name",
"required": true,
"minLength": 3
},
}
}I would like to develop this feature.
Could a maintainer check if it would be useful to you before I get started?
coderabbitai
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested