Fix compatibility with OpenSearch 3
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3526329. -->
Reported by: [damienmckenna](https://www.drupal.org/user/108450)
Related to !7
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>It isn't possible to save a Search API using Opensearch as the AI backend, it gives this error:</p>
<blockquote><p>An error occurred: "OpenSearch error: mapper_parsing_exception - Failed to parse mapping [_doc]: nmslib engine is deprecated in OpenSearch and cannot be used for new index creation in OpenSearch from 3.0.0. - Request: PUT <a href="http://opensearch:9200/mysite_ai">http://opensearch:9200/mysite_ai</a> - Body: {"settings":{"index":{"number_of_shards":1,"number_of_replicas":1,"knn":true,"max_result_window":20000}},"mappings":{"properties":{"vector":{"type":"knn_vector","dimension":2,"method":{"name":"hnsw","space_type":"innerproduct","engine":"nmslib","parameters":{"ef_construction":128,"m":16}}}}}}"</p></blockquote>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Set up OpenSearch 3 on the server.<br>
Go through the process to set up a index.<br>
When saving an AI search_api index with OpenSearch, it will fail.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Make the module compatible with Opensearch 3.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Fix the API issues.</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>TBD</p>
<h3 id="summary-api-changes">API changes</h3>
<p>TBD</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>TBD</p>
issue