我是Lucene的新手。剛剛開始。我有幾個基本問題:Stratio Lucene爲Cassandra
如何查看使用Stratio Lucene創建的所有索引?
如何刪除使用Stratio Lucene創建的索引?
是什麼
fields: { fld_1: {type: "string"}, fld_2: {type: "text"} }
類型之間的區別:「字符串」,然後鍵入:「文本」
我之所以要求不同的是,因爲我跑的錯誤當試圖創建我的第一個lucene索引。我在卡桑德拉列是這樣的:「fld_1文本」,但是當我試圖創建和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"}
}
}'
};
謝謝!
感謝您回覆。我用更多的信息更新了這個問題。我在您提到的頁面上查看示例。你能幫忙解釋一下嗎? – user1860447
您正在使用哪種cassandra和stratio索引版本,並將您正在使用的模式創建索引 –
我正在使用Cassandra 3.10和3.10版。 – user1860447