nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
81 stars 32 forks source link

Elasticsearch 8 compatibility: removal of include_type_name parameter #179

Open nemhods opened 2 years ago

nemhods commented 2 years ago

Hey,

when running a fulltextsearch:test against Elasticsearch 8.1.0, I get:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/nextcloud_fulltext] contains unrec ognized parameter: [include_type_name]"}],"type":"illegal_argument_exception","reason":"request [/nextcloud_fulltex t] contains unrecognized parameter: [include_type_name]"},"status":400}

include_type_name is removed as of Elastic 8: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html

Elasticsearch 8.x

        Specifying types in requests is no longer supported.
        The include_type_name parameter is removed.

This is under Nextcloud 23 and app version 23.0.0.

martadinata666 commented 2 years ago

just refering same issue, but different repo. https://github.com/nextcloud/fulltextsearch/issues/675

ArtificialOwl commented 2 years ago

Funny enough, during ES 6.6, this include_type_name also came with issues. Meaning there should already be a config to remove its generation:

Please test and confirm it is working:

./occ config:app:set --value '1' fulltextsearch_elasticsearch es_ver_below66

ArtificialOwl commented 2 years ago

after some digging, ES8 requires a lot of changes and won't be supported until 8.x is not considered 'stable', and only on last major release of Nextcloud.

jurgenhaas commented 2 years ago

Same problem here and I wonder what @ArtificialOwl means by "8.x is not considered stable"? It looks to me that ES8 is very stable really.

jurgenhaas commented 2 years ago

And BTW, when setting es_ver_below66 to 1, I'm getting the following error when running occ fulltextsearch:test:

  {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [standard : {dynamic=true, properties={owner={type=keyword}, groups={type=keywor  
  d}, circles={type=keyword}, metatags={type=keyword}, source={type=keyword}, title={copy_to=combined, analyzer=keyword, term_vector=with_positions_offsets, type=text}, content={copy_to=combined, analyzer  
  =analyzer, term_vector=with_positions_offsets, type=text}, users={type=keyword}, tags={type=keyword}, provider={type=keyword}, subtags={type=keyword}, links={type=keyword}, combined={analyzer=analyzer,   
  term_vector=with_positions_offsets, type=text}, hash={type=keyword}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping: Root mapping definition has unsupported parameters:  [stand  
  ard : {dynamic=true, properties={owner={type=keyword}, groups={type=keyword}, circles={type=keyword}, metatags={type=keyword}, source={type=keyword}, title={copy_to=combined, analyzer=keyword, term_vect  
  or=with_positions_offsets, type=text}, content={copy_to=combined, analyzer=analyzer, term_vector=with_positions_offsets, type=text}, users={type=keyword}, tags={type=keyword}, provider={type=keyword}, s  
  ubtags={type=keyword}, links={type=keyword}, combined={analyzer=analyzer, term_vector=with_positions_offsets, type=text}, hash={type=keyword}}}]","caused_by":{"type":"mapper_parsing_exception","reason":  
  "Root mapping definition has unsupported parameters:  [standard : {dynamic=true, properties={owner={type=keyword}, groups={type=keyword}, circles={type=keyword}, metatags={type=keyword}, source={type=ke  
  yword}, title={copy_to=combined, analyzer=keyword, term_vector=with_positions_offsets, type=text}, content={copy_to=combined, analyzer=analyzer, term_vector=with_positions_offsets, type=text}, users={ty  
  pe=keyword}, tags={type=keyword}, provider={type=keyword}, subtags={type=keyword}, links={type=keyword}, combined={analyzer=analyzer, term_vector=with_positions_offsets, type=text}, hash={type=keyword}}  
  }]"}},"status":400}
XueSheng-GIT commented 2 years ago

Elasticsearch 8.2 seems to be promoted as latest stable. Thus I'm wondering too why this should be considered unstable.

thomaslc66 commented 1 year ago

I've just created a similar issue, but I think this one is better.

We are reaching Elastic 8.5 so I think it's stable enough to start working on the compatibility with this app.

Is there people that are willing to help you ?

shay-xie commented 1 year ago

get the similar problem on all latest versons:

Ubuntu 22.04.1 LTS Nextcloud Hub 3 (25.0.3),
elasticsearch 8.6

sudo -u www-data php occ fulltextsearch:test

.Testing your current setup: Creating mocked content provider. ok Testing mocked provider: get indexable documents. (2 items) ok Loading search platform. (Elasticsearch) ok Testing search platform. ok Locking process ok Removing test. ok Pausing 3 seconds 1 2 3 ok Initializing index mapping. fail Error detected, unlocking process ok In Connection.php line 675:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/my_index] contains unrecognized parameter: [include_type_name]"}],"type":"illegal_argument_exception","reason":"request [/my_index] contains unrecognized parameter: [include_type_name]"},"status":400}

fulltextsearch:test [--output [OUTPUT]] [-j|--json] [-d|--platform_delay PLATFORM_DELAY]

R0Wi commented 1 year ago

Did you try app version 26 or higher already? ES 8 should now be supported...