-
Notifications
You must be signed in to change notification settings - Fork 10
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
Semantic: Insert Update Delete #81
Comments
Another idea, that doesn't i introduce a new api would be a virtual uri: context, that is accessible like any other context and can be integrated into queries. Such a query would look like /search/uri:document-uri This looks quite as clean as a rest api. Replacing the document description could be done by a new command replace. Am 18.06.2014 um 17:28 schrieb chrisreu [email protected]:
|
That may be possible. But in my opinion, that would not be a clean solution. Neither on implementation side nor from a users point of view. It would not only duplicate the URI in memory, but create a whole map, basically from URI to URI containing redundant data. Also the lookup of a single document would just be more inefficient then necessary. Instead of a literally lookup in the document table the engine would need to run through all steps required for search (query parsing, query processing, computations of the hits). There is only one scenario were this would make sense. That would be, if we store all the documents in the context as well and get rid of the current DocTable abstractions. The key would the URI, the value would be the document. I think that might be something to consider after a first release. |
I think a single update command is sufficient. When the ApiDocument The description fields from the ApiDocument simply overwrite existing fields or With this approach we don't need any change to the interface and don't need any new commands. |
I like this idea. The update command pretty much behaves like this right not, doesn't it? I'm not familiar with the new If we want a restful interface in the future, that supports insert,update and patch with restful semantics, we could still do this on top of the interpreter interface. |
I'm still not a 100% satisfied with the current semantics. We've got 3 operations now for manipulation.
IF the current behavior for the
What are your opinions on this? |
There was some confusion about semantic of insert, update and delete concerning index and doctable.
I guess we've never really defined this, at least not written it down.
The idea of this ticket is to discuss the current state and define how it should work in the future.
Here are my thoughts for the DocTable:
DocTable
I think the document table should get a rest-like interface. This interface should expose the document table in a way that it is possible to retrieve single documents without the need of a query. Think: GetDocumentByUri
Insert would still happen with index inserts, but the interface could provide operations for update in a restful way:
So with update it would be possible to actually remove properties from the document (which is not possible with the current API). Patch could be used by Hayoo to update the Weights, by just patching the Weight field.
The text was updated successfully, but these errors were encountered: