strapi-plugin-fuzzy-search
strapi-plugin-fuzzy-search copied to clipboard
Is it possible to query component content type?
I have a component content type in my collection and the component has a single text field, so is there any way to search the text field which resides inside the component?
Hello @siemen-subbaiah ! Thank you for bringing this up. At the moment this sadly is not possible but I think it is an important feature the plugin should provide. I will see that I can include this feature in the next release and will let you know where once it's published.
👋 Hey there! Is there any update on this? Most of my content is within a component in a dynamic zone. I would love to use this plugin! (I also use the Strapi SEO plugin, it would be awesome if one could include the SEO keywords into the keys!)
As a workaround, you can add a simple hidden text field to the content type in question (e.g. search_text
). Then in the beforeCreate
& beforeUpdate
lifecycle hooks update the hidden field value to match the content from the dynamic zone / component in a plaintext format.
That way you can target fuzzy search to the extra text-field instead of the nested value. Not perhaps a 100% ideal solution but at least it works.
Is this feature supported now?