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

时间:2018-11-09 10:55:45

标签: cassandra lucene cassandra-lucene-index

  

还检查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

1 个答案:

答案 0 :(得分:0)

我不知道您正在使用哪个版本的Cassandra Lucene索引,但是如果您或任何人仍然面临相同的问题,则从评论here看来,这在某些旧版本中是一个问题,{ {3}}是较新的版本,因此请检查您使用的版本是否为新版本,而不遇到问题,然后按照fixed制作jar。