- nebula 版本:2.0.1
- 部署方式:分布式
- 是否为线上版本:N
- 硬件信息
- 磁盘:SSD
- CPU、内存信息:4C、32G、3节点集群
- 问题的具体描述
按照官网的步骤安装了ES和listener:Nebula 基于全文搜索引擎的文本搜索
ES模板配置:
PUT _template/nebula-template
{
"index_patterns": [
"nebula*"
],
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 1
}
},
"mappings": {
"properties" : {
"tag_id" : { "type" : "long" },
"column_id" : { "type" : "text" },
"value" :{ "type" : "keyword"}
}
}
}
nebula-storaged-listener.conf文件配置:
########## nebula-storaged-listener ###########
########## basics ##########
# Whether to run as a daemon process
--daemonize=true
# The file to host the process id
--pid_file=pids_listener/nebula-storaged.pid
########## logging ##########
# The directory to host logging files
--log_dir=logs_listener
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=0
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging
--v=0
# Maximum seconds to buffer the log messages
--logbufsecs=0
# Whether to redirect stdout and stderr to separate output files
--redirect_stdout=true
# Destination filename of stdout and stderr, which will also reside in log_dir.
--stdout_log_file=storaged-stdout.log
--stderr_log_file=storaged-stderr.log
# Copy log messages at or above this level to stderr in addition to logfiles. The numbers of severity levels INFO, WARNING, ERROR, and FATAL are 0, 1, 2, and 3, respectively.
--stderrthreshold=2
########## networking ##########
# Meta server address
--meta_server_addrs=10.65.101.89:9559,10.65.101.42:9559,10.65.101.43:9559
# Local ip
--local_ip=10.65.101.89
# Storage daemon listening port
--port=44510
# HTTP service ip
--ws_ip=10.65.101.89
# HTTP service port
--ws_http_port=12021
# HTTP2 service port
--ws_h2_port=12031
# heartbeat with meta service
--heartbeat_interval_secs=10
########## storage ##########
# Listener wal directory. only one path is allowed.
--listener_path=data/listener
# This parameter can be ignored for compatibility. let's fill A default value of "data"
--data_path=data
# The type of part manager, [memory | meta]
--part_man_type=memory
# The default reserved bytes for one batch operation
--rocksdb_batch_size=4096
# The default block cache size used in BlockBasedTable.
# The unit is MB.
--rocksdb_block_cache=4
# The type of storage engine, `rocksdb', `memory', etc.
--engine_type=rocksdb
# The type of part, `simple', `consensus'...
--part_type=simple
之后按命令启动listener:./bin/nebula-storaged --flagfile etc/nebula-storaged-listener.conf
然后创建space和tag:
CREATE SPACE basketballplayer (partition_num=3,replica_factor=1, vid_type=fixed_string(30));
SIGN IN TEXT SERVICE (10.65.101.89:9200);
ADD LISTENER ELASTICSEARCH 10.65.101.89:9200,10.65.101.42:9200,10.65.101.43:9200;
CREATE TAG player(name string, age int);
CREATE TAG INDEX name ON player(name(20));
INSERT VERTEX player(name, age) VALUES
"Russell Westbrook": ("Russell Westbrook", 30),
"Chris Paul": ("Chris Paul", 33),
"Boris Diaw": ("Boris Diaw", 36),
"David West": ("David West", 38),
"Danny Green": ("Danny Green", 31),
"Tim Duncan": ("Tim Duncan", 42),
"James Harden": ("James Harden", 29),
"Tony Parker": ("Tony Parker", 36),
"Aron Baynes": ("Aron Baynes", 32),
"Ben Simmons": ("Ben Simmons", 22),
"Blake Griffin": ("Blake Griffin", 30);
LOOKUP ON player WHERE PREFIX(player.name, "B");
发现最后一步报错:SemanticError: fulltext index not found : nebula_basketballplayer_tag
看es里面没有出创建出任何索引
show listener都是在线的:
logs_listener/nebula-storaged.INFO的日志: