-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SemanticMediaWiki compatible with new ElasticSearch #5451
Make SemanticMediaWiki compatible with new ElasticSearch #5451
Conversation
I apologise for the somewhat messy commit history. If/when this is merged, a squash commit might be appropriate. |
I would suggest you to "Make SemanticMediaWiki compatible with ElasticSearch 7.10.x" wich is probably the last version of ElasticSearch Wikimedia will support[0]. After that, a migration to OpenSearch[1][2] will follow because of license issues[3]. [0] https://www.mediawiki.org/wiki/Extension:CirrusSearch EDIT: or "Make SemanticMediaWiki compatible with OpenSearch X.x" |
I have not tested it, but I think this PR is also compatible with ElasticSearch 7.x, or requires minimal changes to make it compatible. |
I will try to see if I can get a test wiki running with ElasticSearch 7.10.2 and this PR somewhere in the coming week (probably Friday). |
Thanks for starting with this! Another compatibility question is whether this will still work with ES 6.x, or if these changes can accommodate it. If not, then this will have to be part of SMW 5.x. IMO if it's very difficult/time-consuming, then it is probably not worth it to complicate the code to support MW 1.35-era ElasticSearch 6.x. Perhaps SMW 5.x is a good time to raise SMW's minimum versions to MW 1.39 and ES 7.x. |
See https://phabricator.wikimedia.org/T280482 for reference |
Ad asked Cindy and she will ask the Wikimedia Foundation what their stance will be. For now, it is probably best to:
@krabina @jaideraf What do you think? I didn't have time to test this patch on 7.10 unfortunately, but hopefully I will have time for it next week. |
I totally agree! |
I totally agree, too! |
@JeroenDeDauw I am also wondering what you think. In particular, see this comment by jaideraf and this comment by me. Thank you in advance for taking the time to look at this! |
What you wrote sounds reasonable to me |
I was able to test this patch successfully with the following versions: MediaWiki: 1.39.1 |
Great, thank you for testing! Is this now ready for integration, @JeroenDeDauw, @gesinn-it-gea ? |
Some time ago, we tested the branch from issues:
|
@cicalese and @marijnvanwezel can you reproduce the sorting problem? |
I was unable to reproduce problem 2, but I was able to reproduce problem 1. ES reports the following syntax error in queries with sort:
I am looking into why this happens. |
Query without sort:
Query with sort:
|
The sorting issue is fixed in the above PR. |
Credentials have been moved to `$smwgElasticSearchCredentials` in SemanticMediaWiki#5451
* Improve compatibility with OpenSearch * Fix fatal error on Special:SemanticMediaWiki&action=elastic * Use tabs instead of spaces * `endpoints` no longer contains the credentials Credentials have been moved to `$smwgElasticSearchCredentials` in #5451
I've added some documentation here: #5614 (hope I got it right) |
This pull request makes Semantic MediaWiki compatible with new ElasticSearch (8.x tested). It is currently still a draft, since I have not yet updated the tests. It is working in my personal testing environment.
There are a number of major changes in the ElasticSearch API, as well as some breaking changes in the ElasticSearch PHP package, that this pull request addresses. Most notably:
Promise
objects, which need to be explicitly converted to a type;cat
API no longer returns a JSON by default;$smwgElasticsearchCredentials
;doc_values
is no longer supported on properties of typetext
.