According to the query condition, the problem of setting algolia's searchableAttribute is set dynamically

How do I deal with this problem?I set the setting of algolia dynamically based on different search criteria.However, when setting this setting, it is possible that the setting of setting is not well preserved, so the search results may be the result of the last set of search results.Only after the same query is executed again, may this setting take effect.The search can be performed based on the correct setting.