Open douglasrfaisal-gl opened 1 month ago
Dear @douglasrfaisal-gl
Indeed this feature was implemented under the assumption where type was not removed.
Thus for now only 7.x of elasticsearch is supported now, and I just found this is not documented, will fix the docs on https://docs.nebula-graph.io/3.8.0/4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es/ .
Maybe we could in the future refactor the mapping by removing _type to enable newer elasticsearch.
Thanks!
Hi, @wey-gu
Thanks! I can confirm that using Elasticsearch 7.x resolved my issue.
Please check the FAQ documentation before raising an issue
Describe the bug (required)
Your Environments (required)
Linux [...] 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
12th Gen Intel(R) Core(TM) i7-1255U
fa928930ab34f150db522933323aa610e54f26e7
How To Reproduce(required)
Steps to reproduce the behavior:
metad
,storaged
,listener
,graphd
,storage-activator
, andelasticsearch
(v8.14.1). Run using the commanddocker-compose up -d
in the directory containing this file.nebula-console
. Connect to NebulaGraph. Run the following queries (as demonstrated in Examples)// This example signs in the text service. nebula> SIGN IN TEXT SERVICE ("es":9200, HTTP);
// This example checks the text service status. nebula> SHOW TEXT SEARCH CLIENTS; +-----------------+------+------+ | Type | Host | Port | +-----------------+------+------+ | "ELASTICSEARCH" | "es" | 9200 | +-----------------+------+------+
// This example switches the graph space. nebula> USE basketballplayer;
// This example adds the listener to the NebulaGraph cluster. nebula> ADD LISTENER ELASTICSEARCH "listener0":9789;
// This example checks the listener status. When the status is
Online
, the listener is ready. nebula> SHOW LISTENER; +--------+-----------------+--------------------+-------------+ | PartId | Type | Host | Host Status | +--------+-----------------+--------------------+-------------+ | 1 | "ELASTICSEARCH" | ""listener0":9789" | "ONLINE" | | 2 | "ELASTICSEARCH" | ""listener0":9789" | "ONLINE" | | 3 | "ELASTICSEARCH" | ""listener0":9789" | "ONLINE" | +--------+-----------------+--------------------+-------------+// This example creates the tag. nebula> CREATE TAG IF NOT EXISTS player(name string, city string);
// This example creates a single-attribute full-text index. nebula> CREATE FULLTEXT TAG INDEX fulltext_index_1 ON player(name) ANALYZER="standard";
// This example creates a multi-attribute full-text indexe. nebula> CREATE FULLTEXT TAG INDEX fulltext_index_2 ON player(name,city) ANALYZER="standard";
// This example rebuilds the full-text index. nebula> REBUILD FULLTEXT INDEX;
// This example shows the full-text index. nebula> SHOW FULLTEXT INDEXES; +--------------------+-------------+-------------+--------------+------------+ | Name | Schema Type | Schema Name | Fields | Analyzer | +--------------------+-------------+-------------+--------------+------------+ | "fulltext_index_1" | "Tag" | "player" | "name" | "standard" | | "fulltext_index_2" | "Tag" | "player" | "name, city" | "standard" | +--------------------+-------------+-------------+--------------+------------+
// This example inserts the test data. nebula> INSERT VERTEX player(name, city) VALUES \ "Russell Westbrook": ("Russell Westbrook", "Los Angeles"), \ "Chris Paul": ("Chris Paul", "Houston"),\ "Boris Diaw": ("Boris Diaw", "Houston"),\ "David West": ("David West", "Philadelphia"),\ "Danny Green": ("Danny Green", "Philadelphia"),\ "Tim Duncan": ("Tim Duncan", "New York"),\ "James Harden": ("James Harden", "New York"),\ "Tony Parker": ("Tony Parker", "Chicago"),\ "Aron Baynes": ("Aron Baynes", "Chicago"),\ "Ben Simmons": ("Ben Simmons", "Phoenix"),\ "Blake Griffin": ("Blake Griffin", "Phoenix");
// These examples run test queries. nebula> LOOKUP ON player WHERE ES_QUERY(fulltext_index_1,"Chris") YIELD id(vertex);
+------------+ | id(VERTEX) | +------------+ +------------+
+--------------+ | id(VERTEX) | +--------------+ | "Chris Paul" | +--------------+
E20240718 08:40:14.494640 101 ESListener.cpp:65] {"reason":"Action/metadata line [1] contains an unknown parameter [_type]","type":"illegal_argument_exception","root_cause":[{"reason":"Action/metadata line [1] contains an unknown parameter [_type]","type":"illegal_argument_exception"}]}