Skip to content

docvalue_fields in Suggest response #4148

@Treno1

Description

@Treno1

NEST/Elasticsearch.Net version:6.8.3

Elasticsearch version:6.6.2

Description of the problem including expected versus actual behavior: I`m trying to use docvalue_fields with completion suggester and I cant find FieldValues (fields in elastic responce) property in SuggestOption class.

Steps to reproduce:

  1. Create index with document, containing keyword type field (or any other docvalue located field) "mem_text": { "type": "keyword", "eager_global_ordinals": true }
  2. Create request via Nest with this field new SearchRequest("my_test_idx") { Suggest = new SuggestContainer(), Source = false, DocValueFields = new [] {"mem_text"} };
  3. Call it with _client.SearchAsync<object>(request)
  4. Check that in response in response->Suggest->Values->Options you cant find any property, which will store docvalues data (fields block in elastic response).

Proposal: Copy the following code from Hit class [JsonProperty("fields")] public FieldValues Fields { get; internal set; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions