Sorting and Ranking for Contains text

Hello, I have a question, does algolia give a rating / sorting for attributes containing specific text for example: articles have a city attribute in “chicago”, and for the ranking of articles which have a city in “Chicago” is the top in search, is it possible in algolia?

Hi @irsan I’m not sure I understand your question. If you want to bring all records with the city attribute set to ‘Chicago’, you can do that with filters or optionalFilters.

Does that help?

Hello @cindy.cullen thanks for your reply, what if the city attribute is in the array? example: one record has the attribute city in [“chicago”, “washington”], and I want to show the record for the city in chichago in top of search results and then the city in washington. I want to give a more important score to Chicago than to Washington.

Hi! You can actually filter within an array: Filter an Array | How to | Managing Results | Guide | Algolia Documentation