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
2 answers

C# Elastic aggregate query with size and date range limit

I have the following query which groups by a primary key mainjobid and then groups by a supplied time interval. I would like to restrict the aggregation and hits to a time range supplied by two datetime objects. Setting the Size limits the number of…
BillHaggerty
  • 6,157
  • 10
  • 35
  • 68
1
vote
2 answers

Searching in multiple elasticsearch indexes using NEST

I am trying to search for a text in elasticsearch using nest 7.10.1. I want to search in two different indexes, I get a response in the form of documents, but I cannot access its properties because the result has the combination of two indexes.…
1
vote
1 answer

Why is elasticsearch's Nest lowlevel Search method ignoring type and index name defined in SearchDescriptor<>() object

NEST/Elasticsearch.Net version:5.6.5 Elasticsearch version:5.4.3 We are trying to fetch result from our index using the LowLevelClient. We are using the below SearchAsync API var searchDescriptor = new SearchDescriptor() …
nak
  • 846
  • 2
  • 10
  • 26
1
vote
1 answer

Set the RequestResponseSerializer in ElasticClient

We've seen a resurrection of this issue in a recent update of Elasticsearch (https://github.com/elastic/elasticsearch-net/issues/1937). We set the SourceSerializer when creating the Client connection but that doesn't seem to help. Debugging in, I…
Gerry
  • 11
  • 4
1
vote
1 answer

C# NEST's serializing FieldValue & AggegateDictionary all nulls

Good day: I'm querying my Elastic instance and getting back results for both my scriptField and Aggregation: ScriptField "fields": { "distance": [ 6569.304614953225 ] } Aggregations "aggregations": { …
Dean
  • 887
  • 4
  • 16
  • 42
1
vote
1 answer

Retrieve only internal _id with NEST ElasticClient

I try to execute a search with NEST ElasticClient and getting only the _id of the hits. Here is my Code: var client = new ElasticClient(); var searchResponse = client.Search(new SearchRequest { From = this.query.Page * 100, …
BennoDual
  • 5,865
  • 15
  • 67
  • 153
1
vote
1 answer

Elasticsearch.NET & NEST - search always returning 0 results

I'm trying to search using the ElasticClient.Search method but no matter what terms I set, or field I search by, I always get 0 results. Here is the structure of my POCO: public class MyParent { public MyChild MyChild { get; set; } } public…
Omar Himada
  • 2,540
  • 1
  • 14
  • 31
1
vote
1 answer

Elasticsearch.Net and NEST to search both for a string and array of tags

Having a data like this: { "id" : 22, "name" : "test", "tagIds" : [ 2, 35, 56, 59 ] }, how is it possible to search for both name and tags? Using following query: { "from": 0, "size": 100, "query": { "terms": { "tagIds": [ …
Babak
  • 3,716
  • 6
  • 39
  • 56
1
vote
0 answers

elasticsearch NEST get nested document

situation is this. I have in elastic a group. each of these groups have a nested list of items. Both group and items have an attribute named serial, which are unique. I get a serial for the group and a serial for item, and with those 2 items i'm…
ziraak
  • 131
  • 3
  • 14
1
vote
0 answers

Elasticsearch Aggregation return wrong number on Object Field

I have this mapping: ... [products_categories_id] => Array ( [type] => object ) ... With this set of data: "products_categories_id": [ { "id": 164, "value": "Flight Case e Accessori - Supporti per…
1
vote
1 answer

Elastic Search is not working

When I am giving request to Elastic search my post and put is not working My request POST bird/admin/1 { "id":"1", "ity":"BSP" } It should give success But, getting error { "error": "Content-Type header…
Gopesh
  • 11
  • 3
1
vote
0 answers

Track reindex task

So I kick off reindexing on the ElasticSearch server: // Start reindexing on the server var response = client.ReindexOnServer(new ReindexOnServerRequest() { Source = new ReindexSource() { Index = metadataModel.SourceIndexName }, Destination =…
hyankov
  • 4,049
  • 1
  • 29
  • 46
1
vote
1 answer

How to index without types in NEST in preparation for ES 7+

Looking to use ElasticSearch as well as Net/NEST and was wondering what would be the appropriate way to index a document and NOT use a type? Looking at the NEST docs, it looks to automatically create a type from a POCO, so am not sure how to bypass…
Los Morales
  • 2,061
  • 7
  • 26
  • 42
1
vote
1 answer

Search for a specific query (TermsQuery) without type-specific class in NEST

First time using ElasticSearch (using NEST as the wrapper). I want to search in an external ElasticSearch database. I simply want to run a test query towards a specific field called cvrNummer. I have the following code, which doesn't compile…
Lars Holdgaard
  • 9,496
  • 26
  • 102
  • 182
1
vote
1 answer

Is it possible to query aggregations on NEST for multiple term fields (.NET)?

Below is the NEST query and aggregations: Func, QueryContainer> query = q => q.Term(p => p.type, "conference") // && q.Term(p => p.conference.isWaitingAreaCall,…
Xin
  • 33,823
  • 14
  • 84
  • 85