Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a new column to the Lucene index? #22

Open
maylingge opened this issue Apr 5, 2024 · 0 comments
Open

How to add a new column to the Lucene index? #22

maylingge opened this issue Apr 5, 2024 · 0 comments

Comments

@maylingge
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant