question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing runtime_mappings support for async search requests

See original GitHub issue

NEST/Elasticsearch.Net version: 7.14.1

Elasticsearch version: 7.14.1

.NET runtime version: 5.0

Description of the problem including expected versus actual behavior: Support for defining runtime mappings is missing from IAsyncSearchSubmitRequest and AsyncSearchSubmitDescriptor

When I did a diff between ISearchRequest and IAsyncSearchSubmitRequest I found that they were the same except ISearchRequest had these additional fields:

IRuntimeFields RuntimeFields
ISlicedScroll Slice
IPointInTime PointInTime
Fields Fields

I know async search doesn’t support snapshot and maybe some other things so not sure if any of these are missing on purpose, but generally it seems that async search is supposed to be pretty much the same as a regular search.

https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
stevejgordoncommented, Sep 23, 2021
1reaction
stevejgordoncommented, Sep 21, 2021

Ahh I just noticed that I can get Total from HitsMetadata

Was just going to mention that, but we should have the shortcut property there as well. PointInTimeId would be needed too as it may represent a newer ID for the PIT if that was used on the search. Will get a PR in now.

Bit of a side discussion, but it sure would be nice if models like these shared some sort of interface in common since they are super similar.

I think there are historical reasons it’s been problematic to do so but I can see why it would be useful. I’ll flag that as something I can look at once code-gen is in place as that may dictate some of the design.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Define runtime fields in a search request | Elasticsearch ...
You can specify a runtime_mappings section in a search request to create runtime fields that exist only as part of the query. You...
Read more >
Add support for runtime fields · Issue #59332
Runtime fields. We would like to increase the flexibility of the search API by introducing support for runtime fields.
Read more >
Async search | Elasticsearch Guide [8.9]
The async search API let you asynchronously execute a search request, monitor its progress, and retrieve partial results as they become available.
Read more >
Using Asyncio with Elasticsearch
Async functionality is a new feature of this library in v7.8.0+ so please open an issue if you find an issue or have...
Read more >
Using Asyncio with Elasticsearch
runtime_mappings – Defines ad-hoc runtime fields in the request similar to the way it is done in search requests. These fields exist only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found