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

Add additional meta fields to DocumentType #315

Merged
merged 11 commits into from Jan 25, 2019

Conversation

KodrAus
Copy link
Member

@KodrAus KodrAus commented Aug 27, 2018

Closes #301
Closes #302
Closes #308
Closes #313

Includes index, ty and id. This allows us to infer the values for these document type specific fields in high-level APIs taking a T: DocumentType instead of requiring them everywhere.

It's part of a long-overdue revamp of the DocumentType trait design.

@KodrAus
Copy link
Member Author

KodrAus commented Nov 9, 2018

Could also clean up the client methods by wrapping the document type in a separate method so that generics can be used:

client.document::<MyType>().get(33).send()?;

instead of:

client.document_get::<MyType>(Id::from(33)).send()?;

That would make it clearer how DocumentType can be used to simplify request building.

@KodrAus
Copy link
Member Author

KodrAus commented Nov 10, 2018

Will need to figure out what the docs should look like for this change to the document methods.

@KodrAus KodrAus force-pushed the feat/enhanced-doc-type-expansion branch from 6614037 to 0d6f05a Compare November 11, 2018 00:19
- index
- ty
- id

These can be used by the various high-level APIs to extract values when available
@KodrAus KodrAus force-pushed the feat/enhanced-doc-type-expansion branch from 0d6f05a to 452f87b Compare November 11, 2018 00:28
@KodrAus KodrAus mentioned this pull request Jan 25, 2019
@KodrAus KodrAus changed the title [WIP] Add additional meta fields to DocumentType Add additional meta fields to DocumentType Jan 25, 2019
@KodrAus
Copy link
Member Author

KodrAus commented Jan 25, 2019

This also includes some movement towards supporting Elasticsearch 6.0, but we'll need to build out more document type integration tests to be confident that stuff is correct.

Once this merges we should push vNext onto master, polish up the docs, figure out #317, and then get it out the door!

@KodrAus KodrAus merged commit c70a1ab into vNext Jan 25, 2019
@KodrAus KodrAus deleted the feat/enhanced-doc-type-expansion branch January 25, 2019 13:57
KodrAus added a commit that referenced this pull request Jan 25, 2019
* add meta fields to document type

* add partial static methods

* refactor request paths for better inference

* update for Elasticsearch 6.0
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

Successfully merging this pull request may close these issues.

None yet

1 participant