Hi experts,
It's just a question. Might be a silly one.
I am not sure how to update a Lucene index. It seems I need to drop the index and create it again when I need to add a new column to the index.
For example, if I have index define as following:
CREATE CUSTOM INDEX tweets_index ON tweets ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds': '1',
'schema': '{
fields: {
id: {type: "integer"},
user: {type: "string"},
}
}'
};
And now I have another column to add to the index as following:
body: {type: "text", analyzer: "english"}
Should I drop the old index and create a new one as folowing:
CREATE CUSTOM INDEX tweets_index ON tweets ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds': '1',
'schema': '{
fields: {
id: {type: "integer"},
user: {type: "string"},
body: {type: "text", analyzer: "english"},
}
}'
};
Hi experts, It's just a question. Might be a silly one. I am not sure how to update a Lucene index. It seems I need to drop the index and create it again when I need to add a new column to the index.
For example, if I have index define as following: CREATE CUSTOM INDEX tweets_index ON tweets () USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = { 'refresh_seconds': '1', 'schema': '{ fields: { id: {type: "integer"}, user: {type: "string"},
}' };
And now I have another column to add to the index as following: body: {type: "text", analyzer: "english"}
Should I drop the old index and create a new one as folowing: CREATE CUSTOM INDEX tweets_index ON tweets () USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = { 'refresh_seconds': '1', 'schema': '{ fields: { id: {type: "integer"}, user: {type: "string"}, body: {type: "text", analyzer: "english"}, } }' };
Thanks!