Comments (6)
@flobernd looks like the issue is in one of your generated files, so I cannot just change that. Can you please fix it? I assume that for raw json, we shouldn't use writer.WriteStartObject();
, writer.WritePropertyName(value.VariantName);
, etc...
from elasticsearch-net.
Hi @gpetrou,
the RawJsonQuery
is a bit of a hack. The most easiest fix for me would be to separate the variant-name (e.g. "term") from the rest of the query payload:
var q = new RawJsonQuery("term", "{ \"fieldname\": \"value\" }");
Would that work for you?
Special handling in the generator is possible, but I'd like to avoid that.
Btw.: In general you should prefer not using the RawJsonQuery
, if the functionality is otherwise supported in the client. This construct was only added as a last-resort fallback when the client was still lacking a lot of features. Is there a specific reason for using RawJsonQuery
in your case? I'm curious if I can "properly" improve things to simplify your use-case.
from elasticsearch-net.
There are still cases such as #8169 (comment) where this seems to be needed. I would expect this to work similarly to Nest.RawQuery
.
from elasticsearch-net.
Yes, this case would work.
from elasticsearch-net.
Hi @gpetrou,
the
RawJsonQuery
is a bit of a hack. The most easiest fix for me would be to separate the variant-name (e.g. "term") from the rest of the query payload:var q = new RawJsonQuery("term", "{ \"fieldname\": \"value\" }");Would that work for you?
Special handling in the generator is possible, but I'd like to avoid that.
Btw.: In general you should prefer not using the
RawJsonQuery
, if the functionality is otherwise supported in the client. This construct was only added as a last-resort fallback when the client was still lacking a lot of features. Is there a specific reason for usingRawJsonQuery
in your case? I'm curious if I can "properly" improve things to simplify your use-case.
There is well no RawJsonQuery constructor that accepts two params at least for version 8.13.12 that I use
from elasticsearch-net.
@tabareh Yes, this will be available after I released a fix.
from elasticsearch-net.
Related Issues (20)
- Queries are no longer derive from SearchQuery HOT 4
- Make it easy to log elastic requests HOT 3
- DefaultMappingFor IndexName is not respected in searches HOT 3
- Different classes between filters and return document HOT 3
- can't created repository,response request body missing HOT 4
- Elasticsearch health is accessible but .net client fails HOT 3
- Migration issues Templates and Dynamic queries HOT 5
- Client cannot deserialize string to list of strings HOT 4
- [Feature] Elastic 8 - MatchAll won't accept passing nothing HOT 1
- Creating a local stack s3 repository failed. use Postman works, but code calls are not working.
- [FEATURE] Elastic 8 Client - Stores Enums as Strings HOT 5
- Encountered an unsupported variant tag '' on 'Analysis.INormalizer', which could not be deserialized
- Simplify IndexAsync Abstraction to Infer Index Name from TDocument Type HOT 3
- Lacks the ability to put aggregations into aggregations HOT 5
- Elasticsearch 8.13 documentation not available when NuGet update is available HOT 1
- Deserializing type hierarchies doesn't seem to work HOT 10
- Update index settings with PutSettingsAsync fails with error status code 400: "request body is required" HOT 1
- Failing to deserialize response for `GetIndexAsync` HOT 5
- Cannot retrieve mapping of index with `icu_collation_keyword` field HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-net.