【发布时间】:2017-04-21 03:17:39
【问题描述】:
我是 Lucene 的新手。刚开始。我有几个基本问题:
如何查看使用 Stratio Lucene 创建的所有索引?
如何删除使用 Stratio Lucene 创建的索引?
-
有什么区别
fields: { fld_1: {type: "string"}, fld_2: {type: "text"} }
输入:“字符串”并输入:“文本”
我要求区别的原因是因为我在尝试创建我的第一个 lucene 索引时遇到了错误。我在 Cassandra 中的专栏是这样的:'fld_1 text',但是当我尝试像上面那样在 fld_1 上创建和索引时,它抛出了一个异常
ConfigurationException: 'schema' is invalid : Unparseable JSON schema: Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name
at [Source: {
fields: {
Lucene 索引脚本:
CREATE CUSTOM INDEX lucene_index ON testTable ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds': '1',
'schema': '{
fields: {
fld_1: {type: "string"},
fld_2: {type: "string"},
id: {type: "integer"},
test_timestamp: {type: "date", pattern: "yyyy/MM/dd HH:mm:ss"}
}
}'
};
谢谢!
【问题讨论】: