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
1
vote
1 answer

Query existing index from elasticsearch using NEST

We have an elasticsearch installation with kibana and I was wondering if I can write a query using NEST to display the log files a .Net program? I have tried creating a simple LogMessage POCO class to extract the messages but without success.…
resp78
  • 1,414
  • 16
  • 37
1
vote
1 answer

Java.util.Timestamp => ElasticSearch long => C# NEST DateTime

I use java.sql.Timestamp 2014-12-27 00:00:00 and ElasticSearch saves it as long 1419634800000 with mapping: "EventDateLocal" : { "type" : "long" } and I want to read it in C# (via NEST) in System.DateTime I tried [Date(NumericResolution =…
fpopic
  • 1,756
  • 3
  • 28
  • 40
1
vote
2 answers

Elastic search with GUID ID without attributes

We are looking to switch from a relational database to elastic search and I am trying to get some basic code up and running with Nest. We have existing objects which use guids for ids that I would like to save into an elastic search index. I don't…
Mant101
  • 2,705
  • 1
  • 23
  • 27
1
vote
1 answer

What is the Elasticsearch.Net 2.x equivalent for IElasticSearchResponse.NumberOfRetries?

I'm working on an application that uses the Elasticsearch .NET client libraries (Elasticsearch.Net and NEST) and, as part of a conversion from Elasticsearch 1.x to 2.x, I'm trying to work out the 2.x equivalents of some data that was previously…
Ivan Karajas
  • 1,081
  • 8
  • 14
1
vote
1 answer

How to create MoreLikeThis query for inner array in NEST?

I want to create NEST equivalent for this json query: { "query": { "more_like_this" : { "fields" : ["storages.items"], "like" : ["a","b"], "min_term_freq": 1, "min_doc_freq": 1 } …
Vladimir
  • 2,082
  • 1
  • 13
  • 27
1
vote
1 answer

How do I use Elasticsearch NEST to return results using match search?

I am trying to write a simple console app using C# and NEST to learn more about Elasticsearch. I can run the following query in Sense (Kibana) GET /companies/company/_search { "query": { "match": { "dbaName": "STEAK" …
Airn5475
  • 2,452
  • 29
  • 51
1
vote
2 answers

How do I specify an index for Elasticsearch using NEST?

If I run the code below it will create a mapping on ALL indices, which I don't want. I am unable to find the documentation for specifying just the index I want. How do I specify which index to apply this mapping to? var client = new…
Airn5475
  • 2,452
  • 29
  • 51
1
vote
1 answer

What replaces TermsExecution.And in NEST 2.3.3 (upgrading from NEST 1.6.2)

We are in the process of upgrading ElasticSearch and NEST from 1.6.2 -> 2.3.3. What replaces how we do TermsExecution.And in 2.3.3? How can this be easily done with an unknown number of terms that need to match? e.g. before you were able to just…
Antony Francis
  • 304
  • 1
  • 7
1
vote
0 answers

Copy To in attribute mapping and generic Mapping with reflection in 2.x

For the attribute part, is there any form to tell NEST to use copy to by attributes? I want to create my mapping dynamically, so that I don't code the field property when creating my CreateIndexDescriptor object. Example of attribute…
1
vote
2 answers

Can't Get Highlights to Work with ElasticSearch C# NEST

I'm trying to get highlights back from my searches using the code below. Despite trying all sorts of things the Highlights collection on the result is always empty. Using ElasticSearch server 2.3.1 and NEST 2.3.0. results = _client.Search(…
Jon Edmiston
  • 950
  • 1
  • 9
  • 17
1
vote
0 answers

How to find out the visits made in elasticsearch

We are using ElasticSearch v1.5.1, we have also configured the marvel logs. We use it for Kibana 4.0.1, as well as for our search based results using NEST code. Our Kibana comprises of multiple indexes and various dashboards associated to each of…
cmrhema
  • 981
  • 2
  • 16
  • 28
1
vote
1 answer

How to use params in Elasticsearch Nest 2.x UpdateRequest

I want to use parameters for the script in UpdateRequest without success. Here is the source code: IUpdateRequest updateRequest = new UpdateRequest( indexName, "people", docId); …
Tony Yao
  • 55
  • 7
1
vote
1 answer

Nest - Reindexing

Elasticsearch released their new Reindex API in Elasticsearch 2.3.0, does the current version of NEST (2.1.1) make use of this api yet? If not, are there plans to do so? I am aware that the current version has a reindex method, but it forces you to…
Kat
  • 23
  • 4
1
vote
0 answers

How do I create an index using a json in ElasticSearch NEST, c#.net

I used to create index from json using the following code, var ESClient = new ElasticClient(setting); ESClient.Raw.IndicesCreatePost("indexname", "strJson"); Now, that the nugetPackage of NEST elastic version has changed to 2.0.4, I am unable to…
cmrhema
  • 981
  • 2
  • 16
  • 28
1
vote
1 answer

Assign types to a specific index using NEST2

I would like to be able to set up some sort of mapping using the NEST2 client so that different types are automatically put in a defined index. Is this possible? I've tried to map types like this: client.Map(m =>…
Russell Troywest
  • 8,635
  • 3
  • 35
  • 40