Welcome to Microsoft Q&A! Thanks for posting the question.
The reason for this error is that you can only add one index at a time when using your own data. Adding multiple indexes is not supported.
If you want to query multiple files with different topics, you have either Embeddings or Azure Cognitive Search approach as described in this document.
- Azure Cognitive Search approach: You can create a single index for all your files and use the queryType parameter to specify the type of search you want to perform. You can also use the facets parameter to filter the results by topic or other criteria.
- Embeddings Approach: Use the embeddings approach with a single index and a single embedding model. You can choose a general-purpose embedding model, such as text-embedding-ada-002, that can handle different topics and domains. You can also add a topic column to your files and use it as a metadata field in your index. This way, you can use the filter parameter to narrow down the results by topic or other criteria.
Hope this help.
Please let me know if you have any questions.
Thanks
Saurabh
Please 'Accept as answer' and Upvote if it helped so that it can help others in the community looking for help on similar topics.