- Issue created by @SocialNicheGuru
- π¬π§United Kingdom scott_euser
Ultimately it's using search api as a backend and there is filtering on the metadata stored in zilliz/milvus supported. It attempts to convert the search api query conditions to milvus/zilliz filters so I guess you should be able to programmatically set context via some sort of search api query alter adding a condition as long as you have that e.g. group indexed as meta data (configure fields in search api).
- π©πͺGermany Marcus_Johansson
scotts_eusers response is the correct one for performance.
What you can do when you do the query is that you can set the option "search_api_bypass_access" to FALSE and it will start to iterate through the responses and make sure each of them is something that the user has access to via PHP, see here: https://git.drupalcode.org/project/ai/-/blob/1.0.x/modules/ai_search/src...
It will try 10 loops in, until it gives up trying to find the amount of responses you want. It also gives back the real offset in the `real_offset` parameter and in `reason_for_finish` you can see if its finished because it looped through 10 pages of content or if it reached the end. The parameter `current_vector_score` also exists where you can see the lowest score of any row that we found.
If performance is not off a concern, you have very few users doing this on a fairly small dataset, this solution would work as well and its just a toggle if you are getting a small dataset.
Feel free to close this ticket if scotts and mine answer, answers your question.
- Status changed to Closed: works as designed
about 11 hours ago 2:42pm 20 September 2024