重新启动Cassandra后,Lucene索引不起作用



还检查了Cassandra的错误日志文件,在日志文件中没有发现任何警告或错误。正在尝试重新生成索引,但无法工作。再次需要插入以继续Lucene索引。但我的其他桌子都很好用。下面是我目前面临的问题。当前分区键是文本字段。

CREATE TABLE app_countries(
country_name text,
id timeuuid,
"__v"
timeuuid,
continent_code text,
country_calling_code text,
created_at timestamp,
currency text,
image frozen < imageinfo > ,
in_eu boolean,
is_active boolean,
is_deleted boolean,
iso_code2 text,
iso_code3 text,
latitude float,
longitude float,
lucene text,
sort_order int,
timezone text,
updated_at timestamp,
utc_offset text,
PRIMARY KEY(country_name, id)
) WITH CLUSTERING ORDER BY(id DESC)
AND bloom_filter_fp_chance = 0.01
AND caching = {
'keys': 'ALL',
'rows_per_partition': 'NONE'
}
AND comment = ''
AND compaction = {
'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32',
'min_threshold': '4'
}
AND compression = {
'chunk_length_in_kb': '64',
'class': 'org.apache.cassandra.io.compress.LZ4Compressor'
}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE INDEX app_countries_id_idx ON app_countries(id);
CREATE CUSTOM INDEX app_countries_lucene_idx ON app_countries(lucene) USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds': '1',
'schema': '{"fields":{"id":{"type":"uuid"},"country_name":{"type":"string","case_sensitive":false},"currency":{"type":"string"},"country_calling_code":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"sort_order":{"type":"integer"},"created_at":{"type":"date","pattern":"dd/MM/yyyy"}}}'
};

Cassandra版本:3.11.3

我不知道你使用的是Cassandra Lucene索引的哪个版本,但如果你或任何人仍然面临同样的问题,从这里的评论来看,这在一些旧版本中是一个问题,在新版本中是固定的,所以请检查你使用的版本是否是一个没有问题的新版本,并按照构建步骤生成jar。

最新更新