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

Reindexing an existing index #870

Open
seekeramento opened this issue Mar 11, 2022 · 4 comments
Open

Reindexing an existing index #870

seekeramento opened this issue Mar 11, 2022 · 4 comments

Comments

@seekeramento
Copy link

Is your feature request related to a problem? Please describe.
I am not able to find a way to re-index or even delete an existing index. Once the index is created, I have to assume that the schema will never change.

Does another search engine have this functionality? Can you describe it's function?
N/A

Do you have a specific use case you are trying to solve?
Create an index for a given schema
Add some documents to your created index.
Update the schema by introducing two additional fields.
You should be able to add documents or editing existing ones with the two newly introduced fields.

Additional context
N/A

@hntd187
Copy link
Member

hntd187 commented Mar 11, 2022

I don't believe this is possible in tantivy, can tantivy update it's schema?

@seekeramento
Copy link
Author

In such a case, i it at least possible to delete an entire index? I need this programmatically instead of deleting it from the file system.

@hntd187
Copy link
Member

hntd187 commented Mar 13, 2022

So recently a quickwit-oss/tantivy#1211 introduced non-strict schemas which means unknown fields don't error, but that doesn't re-index the index or change the schema, yea, I'd imagine you would have to delete and recreate the index at this point.

The reason there was no delete endpoint yet was deleting a non-empty directory on windows (and I don't know if this is still the case) was inconsistent so we could get confused if windows for whatever reason decided not to delete the directory. Adding a delete endpoint wouldn't be very difficult it would just be inconsistent, what are you running on?

@seekeramento
Copy link
Author

I see. The scenario I am having is that I need to create indices for given schema. This works fine until I need to update the schema. There is no update, so I thought of deleting and re-adding, but then realized that also deleting indices is not supported.

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

2 participants