Problem/Motivation
The AWS Open Search Serverless (AOSS) has a few restrictions on top of the generic Open Search for performance and security reasons:
- The ping() method doesn't work - The ping is a HEAD request to root (i.e. /). However AOSS does not allow any request to root for security reason.
- index open/close APIs - The module tries to close the index and update the settings and open the index. The open ( & close methods are disabled
You can see the list of available APIs of AOSS at https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ser...
Steps to reproduce
Proposed resolution
- ping() - We could do a GET /_cat/indices which tells whether the server is up or not.
- both POST /<index>/_open and and POST /<index>/_open and are called in BackendClient::updateSettings(). we could add another backend specific to AOSS and remove the open/close calls.
We might need to decide where would we make these changes as this is not related to main module and search_api_aws_signature_connector is too specific to AWS connector related. Either we could add a new sub module for AOSS (search_api_aoss) or I am happy to have it as a separate contrib module.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | no-access.png | 32.84 KB | vijaycs85 |
Issue fork search_api_opensearch-3513714
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:
- 3513714-aoss-mode
changes, plain diff MR !119
- 3513714-aoss-compatibility
changes, plain diff MR !92
- 2.x-3513714
changes, plain diff MR !93
Comments
Comment #2
kim.pepperYeah I think a sub-classed search backend would work. I think a sub-module in this project would make more sense since there would be minimal differences.
Comment #3
vijaycs85thanks! I pushed changes to 2.x at https://git.drupalcode.org/issue/search_api_opensearch-3513714/-/tree/2.... I can't create MR from the fork as I might not have access.
Comment #4
kim.pepper> I can't create MR from the fork as I might not have access.
Did you click "Get Push Access"?
Also all changes go into 3.x first.
Comment #5
vijaycs85> Did you click "Get Push Access"?
I don't see the button (attached screenshot for reference).
> Also all changes go into 3.x first.
yeah, I have a branch for 3.x I will push it once we have some reviews in place.
Comment #8
vijaycs85managed to create MRs directly from the gitlab merge request URL.
Comment #9
vijaycs85Comment #10
vijaycs85Working on CI failures
Comment #11
kim.pepperLooks like just a few PHPCS errors. Also tagging for Needs Tests. I think it would be good for a test to ensure it all get's wired up correctly.
Comment #15
kim.pepperTrying a different approach with a
aoss modesetting.Comment #16
kim.pepperTesting this locally, I am getting
illegal_argument_exception: Can't update non dynamic settings [[index.analysis.filter.synonyms.type, index.analysis.analyzer.default.filter, index.analysis.filter.synonyms.lenient, index.analysis.analyzer.default.type, index.analysis.analyzer.default.tokenizer, index.analysis.filter.synonyms.synonyms]] for indices [content]when saving mappings.
Comment #17
kim.pepperTested with AOSS locally and all looks ok. This is ready for reviews now.
Comment #18
kim.pepperComment #19
pankajb commentedIs there a plan to make this available in 2.x? If not, when will this be released in 3.x? Right now we are using version 2.5.0 with Drupal 10.6.
Comment #20
kim.pepperDepends when people can review it and we can merge it.
Comment #21
pankajb commentedThanks for a quick response. We want to use this feature in our upcoming release in another approx. 2 months. We can look at possibly some collaborative efforts of testing this, if 3.x or 2.x pre release package is available. Does this sounds like even something feasible?