Problem with algolia i dont know how to add a feature

Hello I add a search box to my project that work great with algolia but what i want to do is to add a list of tags in the bottom of the search box components but when I click in an item in the list I like to add it to the search box text and and highlight it and if i click to it next time remove it and also remove the highlight .

and also when I change text to much some of the item the lists item get highlighted

My question is if that algolia offer an api that can do that or i make it from scratch thank you for the reply ?

I read this two links but i cant figure out which one to work with thanks

current refinements

Refinement List

Hi @hamzamiloudamar,

I understand that you want to create a search box with tags below. Once one of those tags is clicked it goes into the search box. My question is on which attribute those tags filter? It is a regular query or a filter? It has an impact on how the feature should be implemented.

I’m not sure to understand the “highlight” part you mentioned. An example of what you want to implement could help to better understand the use case e.g. on an existing website, mock-up, …

Thank you!

Hi @samuel.vaillant and thanks for the reply i create an expemple in code sandbox with react js this is the link for the demo
i make it with react and i like to make something like that with algolia

try to type something exist in the filter and see and the background of the filter gonna change and also when you click in some filter he gonna add to the searchbox

For your question : is on which attribute those tags filter?
for more details about this like i have blog post with some tag in it the article tags:[‘react’, ‘javascript’] in the searchbox i want to filter all blogs that have one of this tags in it and the tags it come from independent array i make it like array of all tags and in each article have some of the tag in the tags array
am so sorry if i dont explene that good and thank you so much for the response i think when you see the demo you gonna understand better than my explanation :smile: :smile:

any help please i am stacking here if i cant do that with algolia please told me to do with with native react but i think it exist but i can’t figure out how to do it

Hi @hamzamiloudamar :wave:

Thank you for the response and the demo you also sent. It looks like you want to provide the end user with tags that they can append/add to the search query by clicking on them (and remove from the search query by clicking again).

If I have understood correctly, this is not something that is built-in with Algolia.

Something similar (but not quite the same) would be to provide tags that help to filter / refine your search results (but do not change the actual search query). Here is an example of what I’m talking about: https://share.getcloudapp.com/YEuyzm4o

Would something like that work instead?

If you want to read more about refining your search results using filters like that, check out this documentation: https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filters-and-facetfilters/

Please let us know if we can help anymore, or if you have any more questions.

Thanks again!
Aoife