-
Notifications
You must be signed in to change notification settings - Fork 1.2k
TermVector support #519
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
Comments
Hey @Mpdreamz, Any attempt at this yet? I'm thinking about taking a crack at it. |
No would love it a PR for this! NEST now thinly wraps around Elasticsearch.NET using RawDispatch, most of the infrastructure for support for termvector is there (raw call, dispatch call, querystring descriptor, call descriptor since all of that is generated) so it should be mostly creating a partial descriptor in NEST/DSL, creating a response object in NEST/DOMAIN/RESPONSES and the call on the client in a There are some quirks around getting the code generation to work but if all is well you won't have to run it right now. I'll be sure to document it and provide build scripts for it. This descriptor should be a good reference: See also all the generated code from the official client spec |
Great! Thanks for the info, I'll give it a shot. |
I think there is a problem with the code generation for the TermvectorDescriptor. Since term vectors are applied at the document level (/{index}/{type}/{id}/_termvector), it seems as though TermvectorDescriptor would need to inherit from DocumentPathDescriptorBase (not IndexPathDescriptor like the CloseIndexDescriptor does in your example above). However, it can't because it is not being generated as a generic type. I'm not familiar enough with how the code generation works to fix this. I'm willing to try though if you can point me in the right direction. |
Ahh this is an excellent moment for me to write all of this down properly but for now I'll try to gist the procedure here. First you need to target the "CodeGeneration" configuration this will only build the code generation tools. All of the generators here: Are partial. When you create a new descriptor here https://github.com/elasticsearch/elasticsearch-net/tree/master/src/Nest/DSL and make it generic like so: When you run the codegeneration project now it will puck up on TermVectorDescriptor.cs and see that its generic and will make the generated part of the partial class in _Descriptors.Generated.cs of the same generic signature. I will have to make a build target for this. |
Thanks to @gmarz termvectors has now been mapped in NEST :) |
No description provided.
The text was updated successfully, but these errors were encountered: