I have a query that I use to return json data from the Elasticsearch Index. Having trouble finding out if I can use that same query inside of a .NET function. I receive filter id's that will change that will need to be used in the aggregation of the query.
Here is the query I am trying to add
{
"sort": "relevance",
"query": "foo",
"filter": { "category": "bar" },
"aggs": [ {"filterId": "id_goes_here"}, {"filterId": "id_goes_here"} ]
}
So the filter Ids will be passed in by a string with the ids separated by a comma. I can just split it by the commas but I am not sure how to add this query body and be able to replace the "id_goes_here" with the actual ids I retrieve.
question from:
https://stackoverflow.com/questions/65904339/is-there-a-way-to-use-a-raw-elasticsearch-query-in-a-net-function-to-post-json 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…