Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docvalue_fields support wildcard? #26299

Closed
jgq2008303393 opened this issue Aug 20, 2017 · 8 comments
Closed

docvalue_fields support wildcard? #26299

jgq2008303393 opened this issue Aug 20, 2017 · 8 comments
Assignees
Labels
>feature good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@jgq2008303393
Copy link

Hi, all.

When using docvalue_fields, we would like to use wildcard like stored_fields:

# already supported
GET /index/_search
{
  "stored_fields": ["*"]
}

# not support now
GET /index/_search
{
  "docvalue_fields": ["*"]
}

Looking forward to this feature.

@jpountz
Copy link
Contributor

jpountz commented Aug 22, 2017

Agreed we should support it for consistency.

@jpountz
Copy link
Contributor

jpountz commented Aug 25, 2017

We discussed it in FixitFriday. We agreed to do this, but at the same time we should probably add a soft limit over the number of doc_values and script fields that are requested (computed based on the number of matches in the mappings) since doc-values fields come up with a per-field per-document seek (while stored fields only incur a per-document seek regardless of the number of fields).

@jpountz
Copy link
Contributor

jpountz commented Aug 25, 2017

I opened #26390.

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
@cbuescher
Copy link
Member

/cc @elastic/es-search-aggs

@oleksii-sl
Copy link

any updates here? I have object with 60 fields and all of them are needed to be extracted

@mayya-sharipova
Copy link
Contributor

@serdyuk-alex the issue is still marked as "adoptme", it is not implemented yet.

@mayya-sharipova mayya-sharipova added the good first issue low hanging fruit label Aug 15, 2018
@iverase iverase self-assigned this Aug 17, 2018
@iverase
Copy link
Contributor

iverase commented Aug 17, 2018

I don't think this is feasible without changing how docvalue_fields work. For example the following query:

GET /index/_search
{
  "docvalue_fields": ["_version"]
}

throws an exception:

"failed_shards" : [
      {
        "shard" : 0,
        "index" : "twitter",
        "node" : "65h3mLZ0TtKkR5GBDdq6dg",
        "reason" : {
          "type" : "illegal_argument_exception",
          "reason" : "Fielddata is not supported on field [_version] of type [_version]"
        }
      }
    ]

Therefore if "*" is expand to all fields (which I believe it should include metadata fields), it will always result on an error.

Note that for stored_fields, fields are ignored if they are not stored.

@jpountz
Copy link
Contributor

jpountz commented Aug 17, 2018

Requesting doc-value fields on all fields is likely going to fail all the time anyway because of the soft limit that we plan to introduce, it will only be possible to use wildcards that match a very narrow set of fields. I think we should implement support for wildcards regardless of the fact that some fields don't support it?

iverase added a commit to iverase/elasticsearch that referenced this issue Aug 20, 2018
For consistency with stored_fields, docvalue_fields should support the use of wildcards.

See also: elastic#26390

Closes elastic#26299
iverase added a commit that referenced this issue Aug 23, 2018
* Search: Support of wildcard on docvalue_fields

For consistency with stored_fields, docvalue_fields should support the use of wildcards. 
Documentation of doc values fields is updated accordingly.

See also: #26390

Closes #26299
iverase added a commit that referenced this issue Aug 23, 2018
* Search: Support of wildcard on docvalue_fields

For consistency with stored_fields, docvalue_fields should support the use of wildcards. 
Documentation of doc values fields is updated accordingly.

See also: #26390

Closes #26299
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

8 participants