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
2
votes
1 answer

Setting analyzer from plugin in ElasticSearch with NEST

my first SO post ! I'm trying to set a Stempel Analyzer (ES analyzer for polish language) for a string field. I can do it through PUT request: { "doc": { "_source": { "enabled": false }, "properties": { …
Leszek ABC
  • 23
  • 5
2
votes
1 answer

How to only return a subset of properties with ElasticSearch

Say I got an ElasticSearch up and running with and Blog object. public class Blog { [ElasticProperty(Name = "guid", Index = FieldIndexOption.NotAnalyzed, Type = FieldType.String)] public Guid? Guid { get; set; } …
Anders Gulbæk
  • 349
  • 1
  • 5
  • 16
2
votes
1 answer

NEST elastic search: how to return certain fields along with aggregated results?

I need to query certain fields, after aggregating. Document structure is: { id: 1, type: AA, hashValue: "qweqeqwdwwew" ...and many more fields } I want to aggregate by 'hashValue', so that i get only unique hashValues and the…
user2439903
  • 1,277
  • 2
  • 34
  • 68
2
votes
1 answer

NEST - How can i do multiple nested aggregation?

How can I do multiple nested aggregation? I have tried something like this: Aggregations(x => x .Nested("Facets", y => y.Path("categories") .Aggregations(r => r.Terms("categories", w => w.Field(q =>…
ibrahimozgon
  • 1,137
  • 1
  • 12
  • 19
2
votes
1 answer

JsonReaderException creating bulk index for elasticsearch

This is my first attempt using elasticsearch. I'm not sure how to troubleshoot the JsonReaderException error below. var result = client.Bulk(d => descriptor); results in an exception error An exception of type 'Newtonsoft.Json.JsonReaderException'…
Migo
  • 153
  • 10
2
votes
1 answer

ElasticSearch REST - insert JSON string without using class

I am looking for an example where we can push below sample JSON string to ElasticSearch without using classes in REST api. { "UserID":1, "Username": "Test", "EmailID": "Test@TestElastic.com" } We get the input as xml and we convert it to…
Sameer Deshmukh
  • 1,339
  • 4
  • 13
  • 20
2
votes
1 answer

ElasticSearch C# client (NEST): access nested aggregation with Spaces

Assuming my 2 values are "Red Square" and "Green circle", when i run the aggregation using Elastic search i get 4 values instead of 2, space separated? They are Red, Square, Green, circle. Is there a way to get the 2 original values. The code is…
2
votes
0 answers

Passing Aggregations to NEST using QueryRaw

We are trying to pass aggregations through NEST in Raw format: { "query": { "filtered": { "query": { "multi_match": { "query": "main", "type": "cross_fields", "fields": [ …
code_blue
  • 523
  • 2
  • 9
  • 19
2
votes
1 answer

Elasticsearch query using NEST & QueryRaw

I have the following Elastic Search query: { "query": { "filtered": { "query": { "multi_match": { "query": "main", "type": "cross_fields", "fields":…
code_blue
  • 523
  • 2
  • 9
  • 19
2
votes
2 answers

Using MinimumShouldMatch with terms query in elasticsearch

I am writing a query in nest for elasticsearch that matches to a list of countries - it cutrrently matches whenever any of the countries in the list is present in ESCountryDescription (a list of countries). I only want to match when all of the…
rynosseros
  • 23
  • 4
2
votes
1 answer

Nest (Geo)Location's Longitude is always 0?

I've been digging deeper into using NEST for a .Net based project that shall utilize ElasticSearch but what keeps or kept puzzling me is that GeoDistance queries never returned any results. When debugging into the responses for a simple "*" query…
Jörg Battermann
  • 4,044
  • 5
  • 42
  • 79
2
votes
1 answer

ElasticSearch NEST MultiGet with Source Filtering

I am attempting to make use of multi get to return a collection of strongly typed objects with source filtering and although I have been able to create the result I want with the JSON API for ElasticSearch, I am not sure how to translate it into the…
Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
1
vote
0 answers

How to define parent/child relationship using Elastic.Clients.Elasticsearch C#

I have this example written in "NEST library 7.6.1" of definition of Parent/Child relationships between elements. "Product" is a parent. "Stock", "Supplier", "Category" is a child of a Product var createIndex =…
user2932893
  • 439
  • 4
  • 14
1
vote
1 answer

Elasticsearch.NET.InMemoryConnection not applying filters on responseData

I have a Elastic Client from Elasticsearch.Net which fetching data from InMemoryConnection and add Query filter on the search but result is not filtering. Its returning entire data from responseBody as result. Am I missing something or this is how…
Keppy
  • 471
  • 1
  • 7
  • 23
1
vote
1 answer

Check if a List contains an object with a certain value using Nest ElasticSearch

I'm trying to build a filter to my BoolQuery. the response object contians an object whic contains 2 properties, a bool and a list of another object like this : responsObject : { innerObject : { myinnerObjectBoolProperty: Bool, …
Mohamad Hammash
  • 237
  • 1
  • 8