Open mgarnick2000 opened 4 years ago
Looks like there are a lot of possible bc breaks in Elasticsearch 7.x:
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html
However we use only a small percentage of its API, so hopefully not too difficult.
We may not be able to get to this right away, as we don't currently have a client actively using Elasticsearch and we're busy with 3.x, but I'd like to make it happen. If you're interested in seeing it pursued via Apostrophe Enterprise Support, let me know.
On Fri, Sep 18, 2020 at 12:58 PM mgarnick2000 notifications@github.com wrote:
The project that i support is currently running apostrophe 2.111.3. I was trying to integrate apostrophe-elasticsearch version 2.1.3. I installed elasticsearch via a docker image that i was running locally following the instructions below https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docker.html. The current project as a large amount of content, especially apostrophe-blogs. I used elasticsearch version 7.9.1. After installing apostrophe-elasticsearch and running the node app apostrophe-elasticsearch:reindex --verbose command I received the following error: StatusCodeError: [mapper_parsing_exception] Root mapping definition has unsupported parameters: [aposDoc : {properties={tagsESExact={type=keyword}, lowSearchTextESExact={type=keyword}, titleESExact={type=keyword}, typeESExact={type=keyword}, highSearchText={type=text}, slugESExact={type=keyword}, title={type=text}, type={type=text}, tags={type=text}, path={type=text}, highSearchTextESExact={type=keyword}, lowSearchText={type=text}, slug={type=text}, pathESExact={type=keyword}}}]
as a workaround i navigated to the node_modules/apostrophe-elasticsearch/index.js, and updated lines 178 -190 with the following code:
return self.client.indices.create({ index: self.getLocaleIndex(locale), body: { settings: self.getLocaleSettings(locale), mappings: { // aposDoc: { properties: properties // } } } }, callback);
The reindex was able to complete, but it was not successful the docker logs, showed the following error: {"type": "server", "timestamp": "2020-09-17T21:25:19,354Z", "level": "INFO", "component": "o.e.a.b.TransportShardBulkAction", "cluster.name": "docker-cluster", "node.name": "39e14168f092", "message": "[s-g-cmsaposdocsendraft][0] mapping update rejected by primary", "cluster.uuid": "Ilv6dTTpSWq9rJIhNAa4-g", "node.id": "J9B_vr18TIaahyOvVbgu9Q" , "stacktrace": ["java.lang.IllegalArgumentException: mapper [titleESExact] cannot be changed from type [keyword] to [text]",
This appears to be an issue with the titleESExact and the type property, i have tried commenting out the title in optional fields, but then highSearchTextESExact threw the same error where it cannot be changed from type [keyword] to [text].
The apostrophe-elasticsearch still works with elasticsearch version 6.8.0. This just needs to address the breaking changes from elasticsearch 7 and above. To Reproduce
Step by step instructions to reproduce the behavior:
- Pull the latest version of elasticsearch, 7.9.1, from docker, by following the instructions in the link above
- Run the docker container and ensure it's status is running.
- Add apostrophe-elasticsearch to an existing apostrophe cms project, preferably the latest version.
- Run node app apostrophe-elasticsearch:reindex --verbose
Expected behavior
Running the apostrophe-elasticsearch:reindex actually reindexes the content allows for searching content on the cms with data stored in mongodb instance. Describe the bug
The apostrophe-elasticsearch reindex is not reindexing content from mongodb. The mapping types needs to be addressed to work with elasticsearch versions 7 and above.
Version of Node.js: We are running node 14.2.0 mongo:4.2.3
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe-elasticsearch/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27MQPAQJ6FP7RUOVB73SGOGUNANCNFSM4RSIDFTA .
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his
The project that i support is currently running apostrophe 2.111.3. I was trying to integrate apostrophe-elasticsearch version 2.1.3. I installed elasticsearch via a docker image that i was running locally following the instructions below https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docker.html. The current project as a large amount of content, especially apostrophe-blogs. I used elasticsearch version 7.9.1. After installing apostrophe-elasticsearch and running the node app apostrophe-elasticsearch:reindex --verbose command I received the following error:
StatusCodeError: [mapper_parsing_exception] Root mapping definition has unsupported parameters: [aposDoc : {properties={tagsESExact={type=keyword}, lowSearchTextESExact={type=keyword}, titleESExact={type=keyword}, typeESExact={type=keyword}, highSearchText={type=text}, slugESExact={type=keyword}, title={type=text}, type={type=text}, tags={type=text}, path={type=text}, highSearchTextESExact={type=keyword}, lowSearchText={type=text}, slug={type=text}, pathESExact={type=keyword}}}]
as a workaround i navigated to the node_modules/apostrophe-elasticsearch/index.js, and updated lines 178 -190 with the following code:
return self.client.indices.create({ index: self.getLocaleIndex(locale), body: { settings: self.getLocaleSettings(locale), mappings: { // aposDoc: { properties: properties // } } } }, callback);
The reindex was able to complete, but it was not successful the docker logs, showed the following error:
{"type": "server", "timestamp": "2020-09-17T21:25:19,354Z", "level": "INFO", "component": "o.e.a.b.TransportShardBulkAction", "cluster.name": "docker-cluster", "node.name": "39e14168f092", "message": "[s-g-cmsaposdocsendraft][0] mapping update rejected by primary", "cluster.uuid": "Ilv6dTTpSWq9rJIhNAa4-g", "node.id": "J9B_vr18TIaahyOvVbgu9Q" , "stacktrace": ["java.lang.IllegalArgumentException: mapper [titleESExact] cannot be changed from type [keyword] to [text]",
This appears to be an issue with the titleESExact and the type property, i have tried commenting out the title in optional fields, but then highSearchTextESExact threw the same error where it cannot be changed from type [keyword] to [text].
The apostrophe-elasticsearch still works with elasticsearch version 6.8.0. This just needs to address the breaking changes from elasticsearch 7 and above.
To Reproduce
Step by step instructions to reproduce the behavior:
Expected behavior
Running the apostrophe-elasticsearch:reindex actually reindexes the content allows for searching content on the cms with data stored in mongodb instance.
Describe the bug
The apostrophe-elasticsearch reindex is not reindexing content from mongodb. The mapping types needs to be addressed to work with elasticsearch versions 7 and above.
Version of Node.js: We are running node 14.2.0 mongo:4.2.3