262 questions
0
votes
0
answers
16
views
How to validate a raw Elasticsearch DSL query string with Elastic.Clients.Elasticsearch v8?
I am using the Elastic.Clients.Elasticsearch v8.19.11 client to connect to Elasticsearch. I want to validate a DSL query provided as a raw JSON string.
I'm not looking for simple JSON validation. ...
1
vote
1
answer
312
views
Implementing Highlighter when migrating from elasticsearch.net 7.17 to elastic.clients.elasticsearch 8.x
I am attempting to migrate from elasticsearch.net client 7.17 to elastic.clients.elasticsearch 8.x and am having trouble implementing the new syntax for the highlighter. I think the pre and post tags ...
1
vote
0
answers
88
views
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", &...
1
vote
1
answer
266
views
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 ...
1
vote
1
answer
662
views
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 : {
...
0
votes
0
answers
90
views
How to declare a delegate with arguments?
I want to reuse the following code:
readonly Func<QueryContainerDescriptor<OemCatalogModel>, QueryContainer> query = q => q.DateRange(d => d.GreaterThanOrEquals(startDate)....
1
vote
2
answers
624
views
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 ...
0
votes
1
answer
446
views
ELASTICSEARCH NEST Automap string override either that string fields receive a keyword normalizer or something else, for case insensitive search
Im very unfamiliar with ElasticSearch, but basically I've been trying to figure out how to make all database fields that are string to be searchable case insensitively. As currently the Automap ...
0
votes
1
answer
938
views
Elasticsearch NEST MultiGet across multiple indexes
I want to run a MultiGet (mget) search query on several IDs across two indexes. This is because I have two indexes, but I don't know which index contains my ID. This is the query:
GET _mget
{
&...
0
votes
0
answers
189
views
Elastic Search Complex Logical Query (SQL to ElasticSearch Query)
My document schema is as follows.
Post
Id
Title
Body
Privacy -> Values can only be ["Me", "Anyone", "Team"]
UserId
What I want to do is retrieve all documents, but ...
2
votes
1
answer
848
views
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 = ...
0
votes
1
answer
1k
views
Defining index templates on ElasticSearch with .NET client
I have ElasticSearch running in a Docker cluster, I use it to search through a ASP.NET core API that queries ES.
I would like to define the index mappings for ES at cluster creation, running a job in ...
0
votes
1
answer
962
views
Search with Russian text analyzer does not work
I have very simple model for ElasticSearch:
[ElasticsearchType(RelationName = "example")]
public class ElasticModel
{
[Text(Name = "description", Analyzer = "Russian",...
0
votes
1
answer
144
views
NEST 7: How to get occurrence number for each document?
I'm using NEST 7.0 and C# to run search queries for Elasticsearch storage using Fluent DSL style. I use MultiMatch to search by passed string value in several number of fields:
queryContainer &= ...
0
votes
3
answers
2k
views
dynamic fields sorting in elasticsearch and.net
I am trying to sort records based on dynamic field names sent to the search API.
the d19FilterCriteria object gives me the field name(SortOn) and the order(SortOrder) for sorting. I have used a sort ...
0
votes
1
answer
1k
views
How do you set Alias.is_write_index in Elasticsearch.Net/NEST when creating a Template
I'm trying to use NEST's Automapping to create an index template like so:
public void ConfigureTemplate()
{
var templateName = $"{config.ElasticIndexPrefix}_template";
var ...
0
votes
1
answer
454
views
v5.5 Elasticsearch Custom Serializer
Is it possible in NEST / Elasticsearch-net 5.5 to make a custom serializer to only work on my own app's defined types and let the built in serializer handle the rest of Elastic packages own types?
I ...
0
votes
1
answer
768
views
Querying nested path from list of strings in Elasticsearch using nest
I know I can do a nested path search when I want to search for just one value using the following code:
.Query(q => q
.Nested(n => n
.Path(p => p.memberships)
...
2
votes
2
answers
1k
views
Is it possible to use ElasticSearch.Net or Nest for dynamic response
Is there a client.Read(...) without generics? I have found none, neither in Nest nor ElasticSearch.Net.
Version 1.5 has an IDocument that might solve my problem but I cannot use that version with ...
2
votes
0
answers
204
views
Default JsonNetSerializer does not camel case property names
I'm injecting a custom serializer using NEST.JsonNetSerializer like this
var settings = new ConnectionSettings(connPool, sourceSerializer: JsonNetSerializer.Default);
When I was using the built in ...
0
votes
1
answer
409
views
How to create MatchQueryDescriptor using field name as a string?
After upgrading Nest from 5.4 to 6.2 I could not find the right syntax to create MatchPhraseQueryDescriptor using known field name as a string. It appears that .Field() method no longer takes a string ...
0
votes
1
answer
265
views
Multiple filter by array of object in Elastic 6.*
Need help with building query through the array in ElasticSearch 6. I have documents that represent some property units with a number of attributes:
{
"Unit":{
"Attributes":{
"...
0
votes
1
answer
281
views
Elasticsearch Must on list object
I am using Elastic 6.0 .My kibana query is as below
"bool": {
"must": [
{
"match": {
"relationships.relation": {
"query": "spouse"
...
5
votes
1
answer
1k
views
Building a dynamic query using object initializer syntax
I am using Nest, to Query Elasticsearch and I have written this query for my search:
var searchResponse = _elasticClient.Search<AdDocument>(s => s
.Query(q => q
.Bool(b => b
...
1
vote
0
answers
273
views
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 ...