Questions tagged [nest2]
11 questions
4
votes
1 answer
C# calculate geodistance with elastic search (nest 2)
I'm implementing a program with the ability to receive the 10 nearest object. As database I use ElasticSearch, my model looks like this.
[Nest.ElasticsearchType(Name = "eventelastic", IdProperty = "Id")]
public class EventElastic:BaseElastic
{
…

Helga Schneider
- 55
- 8
3
votes
1 answer
NEST async call
According to this link, NEST 2.0 internals just moved to a fully fledged async/await implementation.
Does this mean that NEST 2.0 internally works in a complete asynchronous fashion?
If not, shall we use async when calling the NEST API?

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
2
votes
2 answers
Checking if a document exists in index using NEST
I'm reindexing my index, but I've encountered a problem whenever I try to delete a non-existing document, so I need to check if the document already exists.
The approach is just explained in the elasticsearch docs.
I found a question with some…

I.G. Pascual
- 5,818
- 5
- 42
- 58
1
vote
0 answers
Bulk write on ElasticSearch 2.0 NEST 2.0 throws a stackoverflow exception
I was using bulk insertion on my ElasticSearch 1.0 and NEST 1.0. Now I moved to ElasticSearch 2.0 and NEST 2.0 and the bulk insertion throws a stackoverflow (!) exception. My gut feeling is that an infinite recursion is taking place and it consumes…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
What is the replacement for FuzzyMinimumSimilarity in Nest 2, Elasticsearch 2.3?
I'm upgrading to Nest 2 (elasticsearch 1.x to 2.3), but notice on breaking changes that FuzzyMinimumSimilarity and OnFieldsWithBoost are gone. How should i replace this code below to Nest v2?
new SearchDescriptor().Type(searchTypes).Query(q…

Gonzalo
- 322
- 1
- 3
- 13
0
votes
2 answers
NEST2: How to specify the db index name once
Our C# WebAPI application uses of an ElasticSearch database. We're using NEST2 to access the db.
All the NEST2 queries in the code specify the database index name, here an example:
public TestQuery[] GetAllDocuments()
{
var readRecords =…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
How to set document name in NEST 2.0
I have a Dictionary which is being inserted into ElasticSearch 2.0 using NEST 2.0 library.
The default document name is Dictionary'2. I don't know why NEST choose this name but I'd like to have something more sensible like…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
NEST 2.0 doesn't persist some fields into ElasticSearch 2.0
This is my document:
[ElasticsearchType(Name = "MyDoc")]
public class MyDoc: Dictionary
{
[String(Store = false, Index = FieldIndexOption.NotAnalyzed)]
public string text { get; set; }
}
As you can see, it inherits from…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
Add() method not found in NEST 2.0
This is my NEST2.0 POCO declaration:
[ElasticsearchType(Name = "MyDocument")]
public class MyDocument: DynamicResponse
{
[String(Store = false, Index = FieldIndexOption.NotAnalyzed)]
public string HistoryId{ get; set; }
[String(Store =…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
DynamicDictionary is gone on ElasticSearch 2.0 (Elasticsearch.Net)
In my previous code I was using a DynamicDictionary as a base class for my DataRecordDictionary document
[ElasticsearchType(Name = "DataRecordDictionary")]
public class DataRecordDictionary : DynamicDictionary
{
[String(Store = false, Index =…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159
0
votes
1 answer
porting my code to NEST 2.0 and ElasticSearch 2.0
I'm doing a port of my .NET C# WebAPI from NEST 1.0 to the newest NEST 2.0.
Elasticsearch has been updated to 2.0 as well.
.Filters() has been replaced with .Query() which is fine.
However, I can't find the equivalent for .SortAscending(). There is…

Gianluca Ghettini
- 11,129
- 19
- 93
- 159