-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[FEATURE]: Expose Rebuild index via Alter API for users. #8738
Comments
@MichelDiz this is already available through the Alter API. You can drop indexes and then, add them back again and Dgraph will build the indexes again. |
That is not true. When you drop the predicate it will DELETE the tablet. The objective here is to have a non-destructive rebuild. Please, close an issue with proves. I couldn't find any "drop indexes only" or "rebuild indexes" in the Schema API. There is only: PS. If you don't get the objective, ask to clarify. I can improve the text to be more clear if the case. |
How will that benefit? Internally the implementation will drop and recreate the indexes? |
I don't believe there are any drops(for data). Dgraph has always done this, rebuilding the index on the fly with each new Schema change. It was after I requested for this to stop that we didn't do it anymore. I remember Martin doing that. Since then I noticed that users were complaining about indexing. So I suspected it was this change. We didn't drop the data. We just deleted the index and then we recreate it. |
Here the issue #2828 That was one of many changes the devs did back then. In the reindexing and schema code in general. |
I still am not sure what is expected here. Maybe elaborate more. Currently we have enough of options for the user to delete attributes, any indexes (one or more) and recreate them. |
Rebuild ≠ delete attributes
How? I believe we are not talking about the same thing. And there is a way to rebuild the index, but it's not obvious. And it's not professional either. In Neo4J you can do
And this will drop only the index table, not the data or the schema. They also have other functions like "verify". Rebuild indexes is a common thing in any Database. Not sure why you are so confused with the concept. The point is that, if this option exists in the market of databases, why we don't? Is there any specific reason? quote:
https://docs.oracle.com/database/121/SPATL/alter-index-rebuild.htm#SPATL1017
|
I think I see your point now. You are right that we don't have an explicit API for rebuilding indexes. |
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open. |
Use case
The user can run this function to possibly get more performance.
There are reports that the simple fact of removing the index and putting it back. It resulted in perf changes. The goal here is to give Rebuild access directly. Without the user having to go all around.
Current state
Have to be done by manually removing the index.
Solution proposal
Give an operation for this.
e.g:
The text was updated successfully, but these errors were encountered: