fulltextsearch_elasticsearch icon indicating copy to clipboard operation
fulltextsearch_elasticsearch copied to clipboard

Elasticsearch 8 compatibility: removal of include_type_name parameter

Open nemhods opened this issue 3 years ago • 9 comments

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.

nemhods avatar Mar 29 '22 19:03 nemhods

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

martadinata666 avatar Mar 31 '22 04:03 martadinata666

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 avatar May 04 '22 22:05 ArtificialOwl

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.

ArtificialOwl avatar May 05 '22 15:05 ArtificialOwl

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 avatar May 29 '22 08:05 jurgenhaas

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}

jurgenhaas avatar May 29 '22 09:05 jurgenhaas

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

XueSheng-GIT avatar May 29 '22 10:05 XueSheng-GIT

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 ?

thomaslc66 avatar Jan 04 '23 14:01 thomaslc66

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]

shay-xie avatar Jan 21 '23 10:01 shay-xie

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

R0Wi avatar Aug 01 '23 16:08 R0Wi