Questions tagged [elasticsearch-net]

Repository for both Elasticsearch.Net and NEST, the two official elasticsearch .NET clients.

  • low-level client that provides a one-to-one mapping with the Elasticsearch REST API.
  • No dependencies
  • Almost completely generated from the official REST API spec which makes it easy to keep up to date
  • Comes with an integration test suite that can be generated from the YAML test definitions that the Elasticsearch core team uses to test their REST API
  • Has no opinions on how you create or consume requests and responses
  • Load balancing and cluster failover support *All calls have async variants

Home page for both Elasticsearch.Net and NEST, the two official elasticsearch .NET clients, can be found here.

Source code repository is here.

261 questions
0
votes
1 answer

Defining index templates on ElasticSearch with .NET client

I have ElasticSearch running in a Docker cluster, I use it to search through a ASP.NET core API that queries ES. I would like to define the index mappings for ES at cluster creation, running a job in my docker-compose that uses a .NET console app to…
szan
  • 11
  • 2
0
votes
1 answer

Get top xyz from Elastic GET API

I have a requirement to delete documents from Elastic Index. I tried following, but it gives timeouts due to the size of the documents. POST my-index-000001/_delete_by_query?conflicts=proceed { "query": { "match_all": {} } } Therefore, I'm…
Aruna
  • 1,962
  • 4
  • 25
  • 50
0
votes
1 answer

Search with Russian text analyzer does not work

I have very simple model for ElasticSearch: [ElasticsearchType(RelationName = "example")] public class ElasticModel { [Text(Name = "description", Analyzer = "Russian", Index = true, SearchAnalyzer = "Russian")] public string Description {…
Mixim
  • 972
  • 1
  • 11
  • 37
0
votes
1 answer

NEST 7: How to get occurrence number for each document?

I'm using NEST 7.0 and C# to run search queries for Elasticsearch storage using Fluent DSL style. I use MultiMatch to search by passed string value in several number of fields: queryContainer &= Query.MultiMatch(m => m.Fields(fields) …
Zascha
  • 23
  • 3
0
votes
3 answers

dynamic fields sorting in elasticsearch and.net

I am trying to sort records based on dynamic field names sent to the search API. the d19FilterCriteria object gives me the field name(SortOn) and the order(SortOrder) for sorting. I have used a sort descriptor for this purpose. var…
0
votes
1 answer

Group, calculation and order of ElasticSearch data

I have a lot of data stored in the following format (I simplified the data to explain the problem). What I need is: group all the data by "Action Id" field calculate the difference between max and min values of "Created Time" for each group (from…
Igor
  • 281
  • 4
  • 12
0
votes
1 answer

How do you set Alias.is_write_index in Elasticsearch.Net/NEST when creating a Template

I'm trying to use NEST's Automapping to create an index template like so: public void ConfigureTemplate() { var templateName = $"{config.ElasticIndexPrefix}_template"; var client = OpenConnection(config.ElasticEndpoints); …
zorlack
  • 664
  • 2
  • 7
  • 26
0
votes
1 answer

Update multiple documents with same property in NEST Client- Elastic Search

I have an update query which modifies only a single document. But I need to pass multiple documents as input and update them. Previous code is as follows. var clientProvider = new ElasticClientProvider(); var response = await…
roopteja
  • 721
  • 2
  • 16
  • 36
0
votes
1 answer

v5.5 Elasticsearch Custom Serializer

Is it possible in NEST / Elasticsearch-net 5.5 to make a custom serializer to only work on my own app's defined types and let the built in serializer handle the rest of Elastic packages own types? I would like to accomplish this because my custom…
Sumatan
  • 106
  • 1
  • 7
0
votes
1 answer

Querying nested path from list of strings in Elasticsearch using nest

I know I can do a nested path search when I want to search for just one value using the following code: .Query(q => q .Nested(n => n .Path(p => p.memberships) .Query(q2 => q2 .Bool(b => b …
Rob
  • 13
  • 4
0
votes
0 answers

Nest fails to write to ES while executed from Azure functions

I do have azure function which listens to events and write data to ES, but randomly it fails. Exception while executing function: ElasticSearchIndexer Invalid NEST response built from a unsuccessful low level call on POST: /_bulk # Invalid Bulk…
Vova Bilyachat
  • 18,765
  • 4
  • 55
  • 80
0
votes
1 answer

How to create MatchQueryDescriptor using field name as a string?

After upgrading Nest from 5.4 to 6.2 I could not find the right syntax to create MatchPhraseQueryDescriptor using known field name as a string. It appears that .Field() method no longer takes a string but takes an object path instead. What is the…
Alex Uslontsev
  • 543
  • 8
  • 19
0
votes
1 answer

Multiple filter by array of object in Elastic 6.*

Need help with building query through the array in ElasticSearch 6. I have documents that represent some property units with a number of attributes: { "Unit":{ "Attributes":{ "Attribute":[ { …
0
votes
1 answer

Elasticsearch Must on list object

I am using Elastic 6.0 .My kibana query is as below "bool": { "must": [ { "match": { "relationships.relation": { "query": "spouse" } } }, { "match": { …
Sushil
  • 442
  • 3
  • 10
  • 23
0
votes
0 answers

elasticsearch .net client completion suggester performance

For some requests using the Nest or the Elasticsearch.Net client the response time is above 500ms. When using an http client directly or threw kibana interface the same query takes about 1-2ms. This happens event if there are very few documents in…
YonatanBM
  • 46
  • 5