Questions tagged [nest]

0

votes
0

answer
3

Views

nestjs run start:prod fail

run start is ok , but i run start:prod . the error comes, here is the log: 1: 0x1000667f8 node::Abort() [/usr/local/bin/node] 2: 0x1000c3dbe node::Chdir(v8::FunctionCallbackInfo const&) [/usr/local/bin/node] 3: 0x10023eb37 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*)...
astray
0

votes
1

answer
60

Views

ElasticSearch / Nest MatchPhrasePrefix Stopped Working After Version Upgrade

I upgraded from: ElasticSearch 2.0 to 6.6.1 ElasticSearch.Net Nuget package 2.4.6 to 6.5.1 NEST NuGet package 2.4.6 to 6.5.1 ...and my Nest query to do a MatchPhrasePrefix stopped returning results. The software is a search engine for web pages, and one of the features is supposed to let you limit t...
FirstDivision
0

votes
0

answer
3

Views

How do we extract Serilog .ForContext() objects logged to Elasticsearch, using ElasticClient (NEST)?

We are looking to better centralize, structure and search our logs using the ELK stack. We are currently logging to a database table, and we have an EventLog POCO that captures the fields required to populate those rows. Our first stab at getting this data into Elasticsearch was to simply log the ev...
lesscode
1

votes
1

answer
306

Views

Get ElasticSearch bulk queue status with NEST

I have a program that performs several bulk index operation on an ElasticSearch cluster. At some point, I start getting errors like this one (snipped): RemoteTransportException[...][indices:data/write/bulk[s]]]; nested: EsRejectedExecutionException[rejected execution (queue capacity 100) ...]; Is t...
Paolo Tedesco
1

votes
2

answer
789

Views

Query with Nest field boosting returning no results from Elasticsearch

I'm having real problems getting a query using field boosting to work with Elasticsearch. I've been through the Nest docs on the topic, but they weren't particularly helpful, so my code is really based on the solution to this question: Elastic Search using NEST Field Boosting. If I run the following...
Bart Read
1

votes
1

answer
782

Views

Index = FieldIndexOption.No vs OptOut =true?

what is the difference between [ElasticProperty(OptOut =true)] and [ElasticProperty(Index = FieldIndexOption.No)] according to answer here, it is said that optout = true doesnt index the property. I thought Index = FieldIndexOption.No is doing this.
batmaci
1

votes
1

answer
1.8k

Views

Add a mapping to an existing index template (using NEST attributes)

In my ElasticSearch server, I have an existing index template, which contains some settings and some mappings. I want to add a mapping for a new type to the template, but since it's not possible to update templates, I need to delete the existing one and recreate it. Since I would like to keep all th...
Paolo Tedesco
1

votes
2

answer
168

Views

How to populate dropdown box with indices list

Was hoping this could be a quick answer. New to C# and NEST (as is probably obvious from my previous posts). I am using NEST to query my ES instance and have built a small winform application to help accomplish the task. I would like to have one of the comboboxes on my winform populate dynamically...
IrishMickeyWard
1

votes
1

answer
1.3k

Views

Creating a custom analyzer with Nest (for email address)

I have a class with a UserID field which contains a mail address, and I would like to be able to search on that field either for an exact match, or for parts of the mail address with some exclusions. For example, if UserID contains '[email protected]', I would like to be able to search for 'john.do...
Paolo Tedesco
1

votes
1

answer
661

Views

Breaking changes in NEST 2.0 and ElasticSearch 2

I had a WebAPI C# project using NEST 1.0 and ElasticSearch 1.0 Now I moved to NEST 2.0 and ElasticSearch 2.0 and it doesn't compile anymore ElasticType has been deprecated for ElasticsearchType, that's fine However, I have a bunch of properties for my POCOs: [ElasticProperty(Store = false, Index = F...
Gianluca Ghettini
1

votes
1

answer
69

Views

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 => m.Index('index1')); client.Map(m => m.Index('index2')); And then index them like this:...
Russell Troywest
1

votes
2

answer
112

Views

Failing to get structures from Nest with Retrofit on Android

I am trying to request Nest structures via Nest API, using Retrofit 1.9 on Android. Could not be simpler: obtaining auth token works fine, then I issue HTTP GET request with Authorization header = 'Bearer TOKEN'. The query works via Postman and APC clients. However, in the Android app I am getting...
VitalyR
1

votes
1

answer
358

Views

Nest 2.x - Custom JsonConverter

I want to use the IsoDateTimeConverter from Newtonsoft to format the json version of my DateTime properties. However, I cant figure out how this is done in Nest 2.x. Here is my code: var connectionPool = new SingleNodeConnectionPool(new Uri('http://localhost:9200')); var settings = new ConnectionSet...
Rasmus
1

votes
1

answer
1.7k

Views

Match and Match_phrase on multiple fields with the same query string- Elastic Search(Nest)

I have to search for a keyword on multiple fields for the same query string. 'bool': { 'should': [ { 'match': { 'ABC': 'Apple' } }, { 'match': { 'XYZ': 'Apple' } } ] } When I wrote the query DSL , it has been translated as multimatch query(Not sure if the above code and DSL are same) .Bool(b => b ....
ASN
1

votes
1

answer
2k

Views

How to make an accent insensitive search in elasticsearch with nest c# client?

I'm an elasticsearch newbie. Lets say we have a class like this: public class A { public string name; } And we have 2 documents which have names like 'Ayşe' and 'Ayse'. Now, I want to be able to store names with their accents but when I search want to be able take results of accent insensitive quer...
zokkan
1

votes
1

answer
592

Views

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 got in 1.6.2 public static Func AddressComponents(strin...
Antony Francis
1

votes
1

answer
293

Views

Combining BoolQueryDescriptor in Nest 2.x

The following code has two variables of type BoolQueryDescriptor. The repective variables have their own different Must, MustNot, Filter parts in them. Is there a way to combine all the respective Must(s) , Filters , MustNot(s) from each of the variables into a BoolQueryDescriptor variable and feed...
Pavan kumar G
1

votes
1

answer
86

Views

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 pass in an array.
Antony Francis
1

votes
2

answer
1.8k

Views

With ElasticSearch (C#/NEST) get all documents sorted by timestamp

I have an elasticsearch database where I have a type and timestamp field defined as: public Common.MediaType Type { get; set; } public DateTime Timestamp { get; set; } How can I do a query to return X entries, matching a specific type and sorted by timestamp? If I do this: var Match...
Thomas
1

votes
1

answer
128

Views

Date Range Query Elasticsearch

Below query when executed in Elasticsearch version 1.x Was considering documents created after 6/15/2016 that is documents which have time beyond 12 Am for the date 6/15/2016.It was considering documents till 6/15/2016 23:59:59.999 . But with new version of ES 2.x the range query has stopped conside...
Pavan kumar G
1

votes
1

answer
1.3k

Views

Serialising an object to JSON, and then using that to send a query in elastic search using NEST

I get a bit confused and frustrated when it comes to using NEST to querying, as it seems very hit and miss. I have no trouble querying when using standard JSON, so I was wondering if there was some way to query using a JSON object, I have code below var query = 'bkala'; var q = new { query = new { t...
PacketSniffer
1

votes
1

answer
230

Views

ElasticSearch NEST - Search on multiple types but apply filter on selected Type alone

I am looking to achieve a single query for search and filtering. But as expected when i applied filtering, the filter condition applied to all types so i got only the result of those document who have that filtered property and value . For example, Here i searched in 3 types (Product,Category,Manufa...
Linoy.M.Kunjappan
1

votes
1

answer
2k

Views

ElasticSearch 5 Sort by Keyword Field Case Insensitive

We are using ElasticSearch 5. I have a field city using a custom analyzer and the following mapping. Analyzer 'analysis': { 'analyzer': { 'lowercase_analyzer': { 'filter': [ 'standard', 'lowercase', 'trim' ], 'type': 'custom', 'tokenizer': 'keyword' } } Mapping 'city': { 'type': 'text', 'analyzer':...
Vadim Rybak
1

votes
1

answer
585

Views

FilterContainer in Elasticsearch NEST 5.0

I am working on Elasticsearch migration from 1.7.1 to 5.0. I fixed most of the issues in the code after upgrading to 5.0 but I couldn't figure out how to change FilterContainer to work in new version. Below is my code public static List GetPriceRangeFilters(SearchListCriteria criteria, out List addi...
iluvcode
1

votes
1

answer
163

Views

elasticsearch 5.x : how make a nest match query search

In the previous version of Nest , i knew how to do the equivalent of a basic es match query with nest: I created an exemple index and mapping PUT /base_well { 'mappings': { 'person': { 'properties': { 'first_name':{ 'type': 'string' }, 'last_name':{ 'type': 'string' }, 'age':{ 'type': 'integer' } }...
Vivien Pipo
1

votes
1

answer
1.3k

Views

Elasticsearch.Net query using NEST and nested objects to retrieve documents

I'm using Elasticsearch.Net and NEST in an applicationand having trouble accessing documents in an Elasticsearh index when searching based on nested object Ids. The data structure is invoice -> lineItems -> rowItems. I want to search based on these rowItems Id. The (simplified) mapping of the index...
CorribView
1

votes
1

answer
276

Views

nest: build a QueryContainer request with must and a should constraint

I try to build an elasticsearch request with a must and a should request my target request is this bellow: POST /index/type/_search { 'query': { 'bool' : { 'must' : { 'match':{'field1':{'query':'word1'}} }, 'should':{ 'match':{'field2':{'query':'word2'}} } } }} I wrote: var queryContainer = new Que...
Vivien Pipo
1

votes
1

answer
456

Views

Elasticsearch NEST v.5.0.1 sort by GeoDistance error

I faced a problem using NEST in my Web Api Project for sorting by GeoDistance. I have: server with Elasticsearch v5.1.1 (working good) simple .NET Web Api application with NEST v5.0.1 installed (basic CRUD and search operations are working good) Yesterday I decided to implement sorting by GeoDistanc...
Mausic
1

votes
1

answer
331

Views

ElasticSearch index mapping and wildcards

I have a C# application which reads and writes to an ElasticSearch database using NEST. I'm storing documents of type Dictionary I'm also setting some mapping on the fly just after the creation of the index. I'm doing it via NEST calls, see below: elastic.Map(m => m .Index(indexName) .Type('DataReco...
Gianluca Ghettini
1

votes
1

answer
537

Views

Elasticsearch multiple aggregations from array

How can I dynamically combine multiple aggregations in one query dynamically? I know to do it 'hard-coded': request.Aggregations = new TermsAggregation('agg_field1') { Field = 'field1' } && new TermsAggregation('agg_field2') { Field = 'field2' }; But since I use an array containing the fields I need...
Undercover1989
1

votes
1

answer
154

Views

ElasticSearch Nest - querying with just indexname

Am learning to use ElasticSearch with Nest as the .Net client. While indexing the data, I don't have a defined model (type mapping) to write the index to, I rely on ElasticSearch to create that for me Creating the client var settings = new ConnectionSettings(_config.Uri); settings.DefaultIndex(_conf...
sppc42
1

votes
1

answer
234

Views

Change mapping property analyzer in Elasticsearch 5

I have an index on ES already created with a mapping. I need to change a property analyzer to use a new analyzer. I was able to add the new analyzer to the index, but when trying to update the mapping property to use the new analyzer I got an exception. My code: var closeIndexResult = client.CloseIn...
Adriano
1

votes
2

answer
769

Views

ElasticSearch with Nest: Partial search using multiple words using Query<>.Wildcard

I have been pulling my hair out trying to configure and partial search ElasticSearch indexed data using Nest library version 5.3.1 (same version applies to its one of its dependencies; Elasticsearch.Net). As per suggestions found online I used data attributes to specify analyzer type on some of the...
0

votes
0

answer
6

Views

how to get all documents by index in Easticsearch using NEST?

I want to GET all my documents by Index. I have tried the following: var response = client.Search(s => s.Index('test').MatchAll()); the response returns 'successful operation' but it hits no document despite the fact that there are many documents under that index.
Joseph
1

votes
1

answer
582

Views

How to implement ElasticSearch with asp.net web application?

I have read the documentation of ElasticSearch and I am familiar with its endpoints and how to maintain Clusters,Nodes,Indices,etc. Now I am planning to use it in an Asp.net web api and I am a little bit confused about what is the best way to implement it. I found that ElasticSearch provides two opt...
Waddah Rasheed
1

votes
1

answer
1k

Views

How to dynamically create query using NEST for Elasticsearch

I am trying to use NEST to create search query dynamically based on user's input. I have a Filter class with user inputs: Public class ProductFilter { public string Name { get; set; } public DateTime? PublishDateFrom { get; set; } } But for the properties like Name and PublishDateFrom , they could...
codigube
1

votes
1

answer
182

Views

How to specify index.mapping.ignore_malformed setting using NEST in ElasticSearch

Is it possible to specify index.mapping.ignore_malformed setting using ElasticSearch NEST client? I am not able to find any docs or visible api methods to access this setting.
cyberdot
1

votes
1

answer
318

Views

NEST 5.5 Attribute mapping and custom JsonConverter not working

We're using Nest 5.5.0 and attribute mapping to create our indices in Elasticsearch. As part of some of our attributes, we're using custom JsonConverters. We're migrating from 1.7.3, where this mapping was handled correctly. After upgrading, we can see in the mapping that it has mapped the field wit...
Kenneth
1

votes
1

answer
59

Views

Elasticsearch + Nest: Errors are ignored in MultiGetRequests

In an application I'm querying for 2 documents by Id ('doc1' and 'doc2') using an index alias 'my_alias' var multiGetRequest = new MultiGetRequest { Documents = new [] { new MultiGetOperation('doc1') {Index = 'my_alias' }, new MultiGetOperation('doc2') {Index = 'my_alias' } } }; var result = client...
Rasmus
1

votes
3

answer
102

Views

Generic policy type return

I want to retry when the NEST error is in a range of HttpCodeResponse and I have the follow generic policy: public Policy CreatePolicy( PolicyType policyType) where T : Exception where D : IApiCallDetails { switch (policyType) { case PolicyType.WaitAndRetryAsync: var httpStatusCodesWorthRetrying = n...
Guilherme Fidelis

View additional questions