Elasticsearch 7.* and 8.* integration. OpenSearch integration. - #469
Conversation
|
The following features should be tested:
|
|
@ivanmrsulja please create a VIVO PR with updated example.runtime.properties. Also, please move JSON configuration into vivo-es project. Add in the vivo-es project a Docker file, and update README file to explain how ES should be run. |
chenejac
left a comment
There was a problem hiding this comment.
@ivanmrsulja basic VIVO search functionalities works for me. I didn't review the code. Instructions from the PR description about setup of the elasticsearch index might be replaced with a pointer to the vivo-es Readme file.
|
It seems the mapping in the PR description is not the same as the mapping in https://github.com/ivanmrsulja/vivo-es/blob/main/index-config.json |
f9e3825 to
8a008c0
Compare
…entation and configuration mechanisms.
…-side service detection mechanism.
…s own utility class.
|
It seems facets aren't displayed on search page anymore. |
Facets had a small problem but they should work fine now. For me, they displayed either way, just the filters did not work sometimes. How do you mean they are not even displayed? |
|
I don't see filters if I open search page. |
I fixed the empty search field edgecase 🙂 |
|
The edge case is fixed. Why should it only be applied to the /search page? |
I updated the code as you suggested. Also, I cleaned up stale, commented-out code and dependencies and added tests for utility classes. |
| SearchResponse response = null; | ||
|
|
||
| try { | ||
| if (((HttpServletRequest) vreq.getRequest()).getRequestURI().endsWith("/search")) { |
There was a problem hiding this comment.
I think we should avoid conditionals based on servlet name.
There was a problem hiding this comment.
Unfortunately this was the only way I could differentiate from which actual page is this particular servlet called, furthermore, only search page requests require plain text query interpretation. Do you have another suggestion on how I can implement this?
| if (baseUrl.startsWith("https")) { | ||
| httpClient = ESHttpsBasicClientFactory.getHttpClient(); | ||
| } else { | ||
| httpClient = HttpClientFactory.getHttpClient(); |
There was a problem hiding this comment.
It seems that different clients are used when using http or https. In case of using http provided username and password have no effect. In case someone would try to use combination of http and user/password authentication it might not work.
There was a problem hiding this comment.
You are right. I encapsulated everything into one shared factory. Great suggestion!
|
It seems ssl connection doesn't work. |
d141640 to
00e1210
Compare
|
Thank you for the fix. |
It works with Elastic Search 8.19.6 |
I think we can go with support for ES 7 and 8 (as in the title of the PR). |
chenejac
left a comment
There was a problem hiding this comment.
@ivanmrsulja Works for me, tested with OpenSearch.
What does this pull request do?
Updates current ES 6.x integration to 8.x.
What's new?
Changes in ResponseParser and ES documentation on the first draft.
Example:
src/main/java/edu/cornell/mannlib/vitro/webapp/searchengine/elasticsearch/ResponseParser.javato be in line with current ES APIsrc/main/java/edu/cornell/mannlib/vitro/webapp/searchengine/elasticsearch/Elasticsearch_notes_on_the_first_draft.mdwith new mappingHow should this be tested?
Initial setup
{vitro_home}/config/applicationSetup.n3to use this driver (see below).vitro.local.searchengine.urlconfiguration property to contain ES index base URL (due to backward compatibility, Solr can also be configured usingvitro.local.solr.url. This will however result in a warning that is shown in logs, advising the client to switch to a new configuration parameter)vitro.local.searchengine.usernameconfiguration property to contain ES/OS basic auth usernamevitro.local.searchengine.passwordconfiguration property to contain to contain ES/OS basic auth passwordA mapping for the search index
Modify
applicationSetup.n3Your setup should be completed now 😃 ! After this, you should perform common manual tests that are done for every new release.
Interested parties
@chenejac
Reviewers' expertise
Candidates for reviewing this PR should have some of the following expertises: