Problem/Motivation

I am currently evaluating AI and AI search.

Using search api terminology setup a server and 2 indexes for AI search to evaluate.

Server: `milvus_server`
Indexes:
- `node_index` - content index of node data
- `term_index` - taxonomy terms

Indexing has been done and search was working fine before creating the second index.

I am testing RAG search (using the API explorer), I have limited the search to `node_index` so I can search for content with the index property.

But I am getting taxonomy term chunks being returned.

Steps to reproduce

1. Create two indexes on the same server in search API for milvus
2. Index content
3. Use API explorer and `/admin/config/ai/explorers/tools_explorer` and evaluate the RAG tool
4. Limit the search to one index
5. Search
6. Should see chunks from other indexes

Checked at the Milvus client level.

Server == Collection in Milvus
Index == Column / Property in search record

Module does not seem to be filtering for the index in search API but searching only at collection level.

Proposed resolution

1. Add filters to limit search by the index

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

richardgaunt created an issue. See original summary.

richardgaunt’s picture

This might be in the wrong module - might be an `ai` question / issue.

No i think the filtering should be done at the milvus vdb provider level rather than ai_search. Happy to be told otherwise.

richardgaunt’s picture

`\Drupal\ai\Base\AiVdbProviderClientBase::indexItems` - this method in `ai_search` sets the metadata `index_id` which is what is indexed in Milvus and what we need to filtering within the query.

richardgaunt’s picture

Status: Active » Needs review
richardgaunt’s picture

Title: Clarification on structure of Milvus database and query » Milvus queries do not filter by index
socialnicheguru’s picture

Status: Needs review » Needs work

does not apply to the latest dev.
the first file change is not needed