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
3
votes
0 answers

Sort parent documents based on best scored (matching) nested field value using Elasticsearch

Elasticsearch version: 7.6.2 I have the following simplified structure and query below. PUT /products { "mappings": { "properties": { "name": { "type": "text" }, "description": { "type": "text" }, …
3
votes
1 answer

SearchDescriptor.Type method is missing in Nest 7.x

Currently, We are using Nest library version 5.x. As we heart that Nest 7.x is faster, we planned to upgrade version from 5.x to 7.x. While upgrading the library version, I have found that some methods are missing in Nest version 7.x. We have…
Arjun Bhalodiya
  • 293
  • 2
  • 14
3
votes
2 answers

inner_hits does not work for nested filters when searching multiple indices

Elasticsearch version Version: 6.2.2 I'm trying to search multiple indices which both have nested objects. To keep it simple I will use this example. In the query I use "inner_hits" property. PUT /sales { "mappings": { "_doc" : { …
3
votes
1 answer

Loop through aggregations in elastic search nest c#

I want to achieve the equivalent of below SQL query in Elastic: select BookId, PubDate, count(1) from BookMessages where BookId in (1,2) group by BookId, PubDate Hence I wrote the below query in C# var searchresponse = client.Search(s…
Hitesh
  • 3,449
  • 8
  • 39
  • 57
3
votes
1 answer

Elasticsearch NEST 2.0 unable to delete object by ID

I'm unable to delete an object from an index by its ID. I've tried solutions in the following: ElasticSearch and NEST: How do you purge all documents from an…
joelc
  • 2,687
  • 5
  • 40
  • 60
3
votes
1 answer

Token Chars Mapping to Ngram Filter ElasticSearch NEST

I'm trying to replicate the below mappings using NEST and facing an issue while mapping the token chars to the tokenizer. { "settings": { "analysis": { "filter": { "nGram_filter": { "type": "nGram", …
ASN
  • 1,655
  • 4
  • 24
  • 52
3
votes
1 answer

What is the equivalent of FilterDescriptor in NEST 2.3.3

I am in the process of upgrading NEST from 1.6.2 to 2.3.3. Getting type not found for FilterDescriptor, FilterContainer. What are the equivalent types in NEST 2.3.3? Thanks in advance. UPDATE Based on the response from @RussCam, here is what I…
Antony Francis
  • 304
  • 1
  • 7
3
votes
0 answers

elasticsearch nest SniffingConnectionPool not working

I'm using Nest.ElasticClient to connect to Elasticsearch cluster. The cluster is located in Azure VM with just one node. the cluster is accessible outside the vm by url : http://xxxx.cloudapp.net:9200 and also accessible by ElasticClient if not…
Tony Yao
  • 55
  • 7
3
votes
2 answers

Is it possible to map Elastic document ID value to a field in your mapping

I know its possible to map your personal id so that the document id would be the same as your personal id, but is it possible to have it other way around ? How to map document id value to a property in your mapping ? Answers could be preferably…
nlv
  • 791
  • 7
  • 28
3
votes
1 answer

ElasticSearch Bulk Indexing

I am using version 2.1 and the 2.0 (alpha) client with the Nest C# client... I am attempting to bulk insert some records, however, the server is returning an error. I am utilizing the client on a windows client speaking to a Linux server (I don't…
bbqchickenrobot
  • 3,592
  • 3
  • 45
  • 67
3
votes
1 answer

Multiple Mappings in elastic search for one single Index

I have some fields in elastic search type as string and index as not_analysed. while searching for the values of those fields some time I need index as analysed also. So is it possible to do multiple mapping in elastic search for one single…
Mukesh
  • 422
  • 2
  • 4
  • 9
3
votes
1 answer

In Nest (Elasticsearch), how can I get the raw json mapping of an index?

I want to check the discrepancies between my current mapping (as in my C# code) and the mapping in the elasticsearch index. With only: var res = esClient.GetMapping(); I get GetMappingResponse object in c#, I will have to compare field…
foresightyj
  • 2,006
  • 2
  • 26
  • 40
3
votes
0 answers

Elasticsearch - Indexing missing while updating alias

Per this blog post: https://www.elastic.co/blog/changing-mapping-with-zero-downtime/, I am using the recommended best practice for updating an index in production with zero downtime using aliases. Despite this, we are periodically seeing "index…
Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
3
votes
1 answer

ElasticSearch NEST alternative for C# .Contains()

Having moved from Redis to ElasticSearch for my personal project, I need some help from the masters. The basic requirement is as below: Indexes contain POCO of type Album which has fields such as Artist, Title, Year When user enters a search-term,…
Dev
  • 987
  • 2
  • 14
  • 32
3
votes
2 answers

Set Routing in ElasticSearch using NEST and Attribute Mapping

I am trying to setup my mapping using Attribute based mapping I need to set routing, making it required and set to a particular property on my object that I am indexing. Is this possible? Has anyone accomplished this?
Slee
  • 27,498
  • 52
  • 145
  • 243
1 2
3
17 18