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

Add support for runtime fields #61776

Merged
merged 109 commits into from
Sep 3, 2020
Merged

Add support for runtime fields #61776

merged 109 commits into from
Sep 3, 2020

Commits on Jun 17, 2020

  1. Configuration menu
    Copy the full SHA
    ecbed2c View commit details
    Browse the repository at this point in the history
  2. Hack together some script contexts

    Put together some example script contexts for scripted fields. This is
    almost certainly wrong, but it gets us something to think about.
    nik9000 committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    7ab4279 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. Scripted fields: rework script contexts (#58342)

    This reworks the script contexts to support multiple values for each
    hit. Just like before, these are almost certainly not the final
    implementation, but they give us something to iterate on.
    nik9000 authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    c647278 View commit details
    Browse the repository at this point in the history
  2. Spotless and maybe tests?

    nik9000 committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    7d3597b View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. Configuration menu
    Copy the full SHA
    cac5f29 View commit details
    Browse the repository at this point in the history
  2. Fixup test case after merge

    Painless extensions work differently now.
    nik9000 committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    741a30f View commit details
    Browse the repository at this point in the history
  3. Get runtime fields tests passing

    Uses a temporary hack to allow us to use painless in unit tests.
    nik9000 committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    5011a73 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2020

  1. Configuration menu
    Copy the full SHA
    59fc3d7 View commit details
    Browse the repository at this point in the history
  2. Scripted keyword field (#58939)

    This is the first draft implementation of scripted field of type keyword. Still lots of TODOs to address, this PR targets a feature branch.
    javanna authored Jul 2, 2020
    Configuration menu
    Copy the full SHA
    e833e8e View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2020

  1. Configuration menu
    Copy the full SHA
    2ba8e2e View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Configuration menu
    Copy the full SHA
    366ca37 View commit details
    Browse the repository at this point in the history
  2. adapt to upstream changes

    javanna committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    949d1de View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2020

  1. Configuration menu
    Copy the full SHA
    fa48ccd View commit details
    Browse the repository at this point in the history
  2. Add term query for keyword script fields (#59372)

    This adds what I think is just about the simplest possible `term` query
    implementation for `keyword` script fields and wires it into the field
    mapper that we build for them.
    nik9000 authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    2659648 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2020

  1. Configuration menu
    Copy the full SHA
    f426916 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4eb18b2 View commit details
    Browse the repository at this point in the history
  3. Add tests for keyword script field's fielddata (#59523)

    Adds tests for the `keyword` typed `script` field's fielddata
    implementation. One unit test which runs quickly and an integretion test
    for fetching and an integration test for the `terms` agg.
    nik9000 authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    46fcc58 View commit details
    Browse the repository at this point in the history
  4. Two queries for keyword script field (#59527)

    This adds the `exits` and `terms` query for the `keyword` style of
    scripted field.
    nik9000 authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    c9b9b73 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2020

  1. Remaining queries for script keyword fields (#59630)

    Adds the remaining queries for scripted keyword fields and handles a few
    leftover TODOs, mostly around `hashCode` and `equals`.
    nik9000 authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    719ef1f View commit details
    Browse the repository at this point in the history
  2. Allow runtime fields to depend on one another (#59636)

    This updates a test so that runtime fields depend on one another and
    fixes support for it.
    nik9000 authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    9dd56fd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5e9352 View commit details
    Browse the repository at this point in the history
  4. Runtime fields: rework script service injection (#59659)

    Instead of relying no createComponents to get the script service, we rely on the query shard context supplier that's available in the parser context, yet we only carry around as callback that allows us to compile the script
    javanna authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    30861e6 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2020

  1. Mark all scripted field queries as expensive (#59658)

    This will cause them to fail if you don't have permission to execute
    expensive queries.
    nik9000 authored Jul 16, 2020
    Configuration menu
    Copy the full SHA
    4ba86b1 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2020

  1. Configuration menu
    Copy the full SHA
    4b288e7 View commit details
    Browse the repository at this point in the history
  2. Temporarily awaits fix failing script mapper unit tests

    There seems to be no longer a way to require a field in mapper paramaters. This needs to be fixed upstream.
    javanna committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    d4a724c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9d2d91c View commit details
    Browse the repository at this point in the history
  4. Fix parsing unsupported runtime types error

    The error was calling toString on the parameter object. we need to instead print out the returned value by calling getValue
    javanna committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    bd1b2ae View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    390fa65 View commit details
    Browse the repository at this point in the history
  6. Pass script params through to fielddata impl (#59762)

    This addresses a TODO around using the script params, which are now parsed from the mappings. It also expand existing tests to verify that params are carried around and accessible in script for both fielddata and queries.
    
    Relates to #59332
    javanna authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    45d0dc5 View commit details
    Browse the repository at this point in the history
  7. Add long flavored script field (#59721)

    This adds the `long` runtime type to `script` fields and implements doc
    values, field data, the `term` and `exists` query.
    nik9000 authored Jul 17, 2020
    Configuration menu
    Copy the full SHA
    c8b5af9 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2020

  1. Render script params in script field xcontent (#59813)

    This fixes the rendering of the `script` field in the `script` field
    type. Originally we weren't rendering the `params` and such because we
    couldn't parse them. But we can parse them now so we should render them.
    
    This updates the integration tests to include params and adds an
    integration test that fetches the mapping.
    nik9000 authored Jul 20, 2020
    Configuration menu
    Copy the full SHA
    bdc2b16 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2c5c478 View commit details
    Browse the repository at this point in the history
  3. adapt to upstream changes

    javanna committed Jul 20, 2020
    Configuration menu
    Copy the full SHA
    89ebf20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f5f314 View commit details
    Browse the repository at this point in the history
  5. Remaining queries for long script field (#59816)

    Adds the `terms` and `range` queries for `long` typed `script` fields.
    It also fixes a bug in a few of `toString` tests for `keyword` typed
    `script` fields.
    nik9000 authored Jul 20, 2020
    Configuration menu
    Copy the full SHA
    0589d2e View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2020

  1. Configuration menu
    Copy the full SHA
    a0ef1ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    be44fc7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b81db2a View commit details
    Browse the repository at this point in the history
  4. Update doc values after merge

    nik9000 committed Jul 21, 2020
    Configuration menu
    Copy the full SHA
    26506c4 View commit details
    Browse the repository at this point in the history
  5. Make full text queries work against keyword scripted fields (#59990)

    The keyword scripted field should apply the keyword analyzer at all times, by providing it as part of TextSearchInfo to the base mapped field type class. That is because the field does not support normalization, and if we don't force the keyword analyzer the default search analyzer will get picked up which will lowercase the query etc.
    
    Relates to #59332
    javanna authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    bc3267b View commit details
    Browse the repository at this point in the history
  6. Add double script fields (#59933)

    This adds support for `double` typed `script` fields.
    nik9000 authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    8bddd84 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2020

  1. Configuration menu
    Copy the full SHA
    5fcef9a View commit details
    Browse the repository at this point in the history
  2. Adapt to upstream changes

    javanna committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    82392d8 View commit details
    Browse the repository at this point in the history
  3. Replace script unit tests with integration tests (#60027)

    This replaces the fancy unit tests that we were doing to test our
    painless integration with an extension to our existing integration
    tests. The integration tests are "more real", shorter, and are a nice
    step down the road of dropping our dependency on the painless plugin in
    favor of a dependency only on it's SPI.
    nik9000 authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    9d72854 View commit details
    Browse the repository at this point in the history
  4. Drop some yml tests for script fields (#60079)

    We have unit tests for all of these things and the other yml tests offer
    good proof that these things work.
    nik9000 authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    9adf29c View commit details
    Browse the repository at this point in the history
  5. Standardize script field's rejection error (#60029)

    This standardizes the exception type thrown when attempting to build a
    query on a script field that it doesn't support. It also replaces the
    field type `[script]` in the error message with whatever the runtime type
    is.
    nik9000 authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    9a3fa42 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9b8bf02 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2020

  1. Configuration menu
    Copy the full SHA
    ad3fb94 View commit details
    Browse the repository at this point in the history
  2. Replace painless unit tests with mock scripts (#60094)

    Now that we have good yml tests for runtime_script fields we don't need
    painless in our unit tests at all. This replaces painless with a mock
    script which runs more quickly and isolates us from painless's
    internals.
    nik9000 authored Jul 23, 2020
    Configuration menu
    Copy the full SHA
    37a1418 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2020

  1. Configuration menu
    Copy the full SHA
    bceb41a View commit details
    Browse the repository at this point in the history
  2. adapt to upstream changes

    javanna committed Jul 27, 2020
    Configuration menu
    Copy the full SHA
    bf04ea7 View commit details
    Browse the repository at this point in the history
  3. Pass a SearchLookup supplier through to fielddataBuilder (#60224)

    Runtime fields depend on SearchLookup to be able to look up other fields and manipulate them. With this change we add a SearchLookup argument to the existing MappedFieldType#fielddataBuilder method. Additionally the use of runtime fields in index sorting is disallowed.
    
    Relates to #59332
    javanna authored Jul 27, 2020
    Configuration menu
    Copy the full SHA
    9026770 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. Configuration menu
    Copy the full SHA
    e3bbb3b View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2020

  1. Configuration menu
    Copy the full SHA
    cec7c13 View commit details
    Browse the repository at this point in the history
  2. Add runtime_script date field (#60092)

    Adds support for `runtime_script` fields with `runtime_type: date`.
    Doesn't add support for the `format` parameter to the mapper but *does*
    support it on aggregations and the like. Its a start!
    nik9000 authored Jul 29, 2020
    Configuration menu
    Copy the full SHA
    35ca380 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2020

  1. Configuration menu
    Copy the full SHA
    28f6fd0 View commit details
    Browse the repository at this point in the history
  2. adapt to upstream changes

    javanna committed Jul 31, 2020
    Configuration menu
    Copy the full SHA
    af9b302 View commit details
    Browse the repository at this point in the history
  3. Error on bad shape relations in runtime fields (#60463)

    Most core types throw back an error if the `relation` on a `range` query
    is `disjoint`. This make runtime fields do the same.
    nik9000 authored Jul 31, 2020
    Configuration menu
    Copy the full SHA
    e1cb361 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2020

  1. Configuration menu
    Copy the full SHA
    0438030 View commit details
    Browse the repository at this point in the history
  2. Format support for script doc fields (#60465)

    Adds `format` and `locale` support to `runtime_script` fields,
    specifically those with the `runtime_type` of `date`. Others
    `runtime_type`s will return an error if provided with those parameters.
    nik9000 authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    0e91859 View commit details
    Browse the repository at this point in the history
  3. Runtime script field mapper to reject copy_to and fields (#60580)

    Multi fields and copy_to are not supported by the runtime script field mapper. They are now rejected when provided.
    javanna authored Aug 3, 2020
    Configuration menu
    Copy the full SHA
    b6e0609 View commit details
    Browse the repository at this point in the history
  4. Fix build

    Looks like we lost a method that I was using in a test when merging
    master. Oops! This fixes the build and lets us move forward.
    nik9000 committed Aug 3, 2020
    Configuration menu
    Copy the full SHA
    ce583aa View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2020

  1. Configuration menu
    Copy the full SHA
    4540211 View commit details
    Browse the repository at this point in the history
  2. Implement runtime script ips (#60533)

    This implements the `ip` typed runtime fields. They share a fair bit
    with `string` runtime fields but we represent them as a `BytesRef`
    containing 128 bits so that the comparisons all happen in the same way
    as Lucene's `InetAddressPoint`.
    nik9000 authored Aug 5, 2020
    Configuration menu
    Copy the full SHA
    e98dfcc View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2020

  1. Configuration menu
    Copy the full SHA
    5e3ea6e View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2020

  1. Add the ScriptService to the field parser config (#60933)

    This makes parsing runtime fields much simpler.
    
    We'd initially resisted doing this but all of our other integration options
    proved more troublesome.
    nik9000 authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    9b9aa5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd8b557 View commit details
    Browse the repository at this point in the history
  3. Run core's integration tests with runtime fields (#60931)

    Adds the `x-pack/plugin/runtime-fields/qa/rest` project to run core's
    integration tests against an index with `runtime_scipt` fields. This
    works by modifying the test configuration on load to replace supported
    field types with `runtime_script`.
    
    Relates to #59332
    nik9000 authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    eeb4afb View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2020

  1. Some progress on failing runtime fields tests (#61098)

    This breaks apart the a test for the `terms` aggregation into one that
    work for runtime fields and one that doesn't.
    nik9000 authored Aug 13, 2020
    Configuration menu
    Copy the full SHA
    4a5d317 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2020

  1. Implement distance_feature for runtime dates (#60851)

    This implements the distance_feature for `date` valued `runtime_script`s.
    This produces the same numbers running against an indexed date, but it
    doesn't have the same performance characteristics at all. Which is normal
    for `runtime_script`s`. But `distance_feature` against an indexes fields
    does a lot of work to refine the query as it goes, limiting the number of
    documents that it has to visit. We can't do that because we don't have an
    index. So we just spit out the same numbers and hope it is good enough.
    nik9000 authored Aug 17, 2020
    Configuration menu
    Copy the full SHA
    f3b65eb View commit details
    Browse the repository at this point in the history
  2. Borrow more tests for runtime fields (#61113)

    This "borrows" 150 more tests from core for runtime fields, extending
    the work done in #60931. More precisely, it adds a template to every
    test that forces dynamic mapping updates to build runtime fields where
    possible. In particular, `long` and `double` field are created as
    runtime fields. `string`-typed fields are mimick the out of the box
    behavior and create a top level `text` field with a `.keyword`
    multi-field, but this `keyword` multi-field executes a script and loads
    from source.
    nik9000 authored Aug 17, 2020
    Configuration menu
    Copy the full SHA
    76eb16e View commit details
    Browse the repository at this point in the history
  3. Include boost in distance_feature query equals

    Add `boost` to a scripted-`date`'s `distance_feature` query's equals
    method.
    nik9000 committed Aug 17, 2020
    Configuration menu
    Copy the full SHA
    1e63126 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    99c885e View commit details
    Browse the repository at this point in the history
  5. Add boolean values script fields (#60830)

    This adds `boolean` values `runtime_script` fields.
    nik9000 authored Aug 17, 2020
    Configuration menu
    Copy the full SHA
    07bfa51 View commit details
    Browse the repository at this point in the history
  6. Add a consistent way to parse dates (#61105)

    This adds a `parse` method to `date` valued `runtime_script`s that
    converts any `Object` into a `long` using the same mechanism that
    indexing a `date` uses.
    
    We also use this new method to expand our test that run's core's
    integration tests against runtime fields to `date` values fields.
    Previously we couldn't do that because we didn't have a consistent way
    to parse the field.
    nik9000 authored Aug 17, 2020
    Configuration menu
    Copy the full SHA
    3870b6f View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2020

  1. Fix value method on ip scripts (#61230)

    Fixes `doc['ip'].value` when `ip` is a script field. It didn't work
    properly before because it wasn't whitelisted. We can't whitelist it
    easilly because it was over in a module rather than core. This fixes
    that by sharing more code with core that *is* whitelisted.
    nik9000 authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    b5e8524 View commit details
    Browse the repository at this point in the history
  2. Opt date valued script fields out of rate limit (#61238)

    This excuses script fields from the script compilation rate limiting.
    It'd be fairly sad to prevent mapping updates because of the rate limit.
    And we don't expect folks to add a zillion fields. On the other hand,
    once we allow these scripts on the `_search` request we might indeed
    want them to be considered in the limit. But we don't support that yet
    and we can deal with that when we get there.
    nik9000 authored Aug 18, 2020
    Configuration menu
    Copy the full SHA
    40e3aec View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2020

  1. Drop compile limit on runtime fields scripts (#61297)

    This opts all of the script contexts used by `runtime_script` our of the
    compilation rate limiting because it'd be lame to prevent a mapping
    update because we can't compile the script.
    nik9000 authored Aug 19, 2020
    Configuration menu
    Copy the full SHA
    51a56b3 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2020

  1. Configuration menu
    Copy the full SHA
    aa3f29f View commit details
    Browse the repository at this point in the history
  2. [DOCS] Update CCR docs to focus on Kibana (#60555)

    * First crack at rewriting the CCR introduction.
    
    * Emphasizing Kibana in configuring CCR (part one).
    
    * Many more edits, plus new files.
    
    * Fixing test case.
    
    * Removing overview page and consolidating that information in the main page.
    
    * Adding redirects for moved and deleted pages.
    
    * Removing, consolidating, and adding redirects.
    
    * Fixing duplicate ID in redirects and removing outdated reference.
    
    * Adding test case and steps for recreating a follower index.
    
    * Adding steps for managing CCR tasks in Kibana.
    
    * Adding tasks for managing auto-follow patterns.
    
    * Fixing glossary link.
    
    * Fixing glossary link, again.
    
    * Updating the upgrade information and other stuff.
    
    * Apply suggestions from code review
    
    * Incorporating review feedback.
    
    * Adding more edits.
    
    * Fixing link reference.
    
    * Adding use cases for #59812.
    
    * Incorporating feedback from reviewers.
    
    * Apply suggestions from code review
    
    * Incorporating more review comments.
    
    * Condensing some of the steps for accessing Kibana.
    
    * Incorporating small changes from reviewers.
    
    Co-authored-by: debadair <[email protected]>
    Co-authored-by: Elastic Machine <[email protected]>
    3 people authored and javanna committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    c5d00be View commit details
    Browse the repository at this point in the history
  3. Fix testConcurrentSnapshotDeleteAndDeleteIndex (#61228)

    There is a corner case here in which during partial snapshot the index is
    deleted right between starting the snapshot in the CS and the data node getting to work
    on it, causing the data node the fail that shard snapshot and making the snapshot `PARTIAL`.
    
    Closes #61208
    original-brownbear authored and javanna committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    32580d8 View commit details
    Browse the repository at this point in the history
  4. Remove Unused ByteBufferReference (#61116)

    We only work with heap byte buffers at this point and those we can and do unwrap the
    `byte[]` ourselves and use `BytesArray` instead of a needless level of indirection via `ByteBuffer`.
    original-brownbear authored and javanna committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    5026fc7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    876d81e View commit details
    Browse the repository at this point in the history
  6. Add UBI docker builds (#60742)

    This PR resurrects support for building Docker images based on one of Red Hat's UBI images. It also adds support for
    running the existing Docker tests against the image. The image is named `elasticsearch-ubi8:<version>`.
    
    I also changed the Docker build file uses enums instead strings in a lot of places, for added rigour.
    pugnascotia authored and javanna committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    8bd95cd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b903a8f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6a9dde5 View commit details
    Browse the repository at this point in the history
  9. Revert visibility change to DocLookup constructor

    This can remain package private
    javanna committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    63d6ab2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e2dd0bd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5858dcc View commit details
    Browse the repository at this point in the history
  12. Drop single node test case from runtime fields (#61241)

    This replaces the `ESSingleNodeTestCase` with `ESTestCase` in runtime
    fields, proving that we can use `ESTestCase` to test field mappers.
    nik9000 authored Aug 24, 2020
    Configuration menu
    Copy the full SHA
    8818156 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2020

  1. Convert double script to return array (#61504)

    This replaces the value collection method in `double` valued runtime
    script fields with simply returning a `double[]`. Painless has some
    "convert" features that allow us to define automatic conversions from
    things like `double` and `Collection` into `double[]` so we use those.
    nik9000 authored Aug 25, 2020
    Configuration menu
    Copy the full SHA
    6d8170c View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. 3 Configuration menu
    Copy the full SHA
    0a3d391 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a67e76 View commit details
    Browse the repository at this point in the history
  3. Test async and graph against runtime fields (#61651)

    This runs the async search and graph tests against runtime fields.
    nik9000 authored Aug 27, 2020
    Configuration menu
    Copy the full SHA
    c9bd8c8 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. Revert "Convert double script to return array (#61504)"

    This reverts commit 6d8170c. We've
    decided to stick with the `value` style functions for runtime fields.
    nik9000 committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    95cdff7 View commit details
    Browse the repository at this point in the history
  2. Standardize runtime field emit methods (#61752)

    This standardizes that name for all of the "emit value" methods used by
    runtime field scripts to `emitValue`. To make dates possible this adds a
    a `toEpochMilli` method to convert from `TemporalAccessor` into millis
    since epoch.
    nik9000 authored Aug 31, 2020
    Configuration menu
    Copy the full SHA
    0284f3d View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2020

  1. Adapt to upstream changes

    Possilby after #61457, the priority we use for the index template that converts core yaml tests to use runtime fields is already taken, which causes an error as there ma be multiple matching templates with same priority.
    javanna committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    acfaccb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d47d450 View commit details
    Browse the repository at this point in the history
  3. Support format on runtime numbers (#61787)

    This adds support for the `format` parameter on `long` and `double`
    valued long fields. It only adds support for it in the request - in the
    mapping it is not yet supported.
    nik9000 authored Sep 1, 2020
    Configuration menu
    Copy the full SHA
    2356d7d View commit details
    Browse the repository at this point in the history
  4. Add API test dependency

    Runtime fields needs to see the point in time api for its tests.
    nik9000 committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    1ea67d2 View commit details
    Browse the repository at this point in the history
  5. Drop security policy from runtime fields

    We had it for testing early on and forgot to remove it.
    nik9000 committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    34e576f View commit details
    Browse the repository at this point in the history
  6. Explicit tests for nested fields (#61761)

    Adds explicit tests for nested fields to the runtime fields project.
    And skip all of the core tests for nested fields. They don't really have
    a chance of resolving the right fields from the source.
    nik9000 authored Sep 1, 2020
    Configuration menu
    Copy the full SHA
    d027a71 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c0802bb View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. Configuration menu
    Copy the full SHA
    c916061 View commit details
    Browse the repository at this point in the history
  2. Runtime fields to expose _source and stored fields like existing scri…

    …pts (#61775)
    
    This commit exposes stored fields to runtime fields (through params._fields) and replaces the current way to access _source (source['field']) in favour of the documented way for all existing scripts: params._source .
    javanna authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    0040a59 View commit details
    Browse the repository at this point in the history
  3. Test DLS and FLS against runtime fields (#61820)

    This commit introduces integration tests for Document level security with queries against runtime fields, as well as field level security used in combination with runtime fields.
    
    Relates to #59332
    javanna authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    d9ca982 View commit details
    Browse the repository at this point in the history
  4. Expand testing for field_caps and search across multiple indices (#61836

    )
    
    This commit adds tests around field_caps and search against multiple indices, where one index has some fields defined as runtime fields, while another index has the same fields defined as concrete fields. We want to make sure that as long as the data type matches, the two can integrate seamlessly.
    
    Relates to #59332
    javanna authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    a8ae54a View commit details
    Browse the repository at this point in the history
  5. Expand max chain depth testing (#61833)

    This commit extends the coverage around max chain depth in runtime fields. We test that direct references are not counted, that 5 references are allowed while 6 are not, and we test that the same error is returned no matter where the runtime field is used.
    
    Relates to #59332
    javanna authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    8ffa4d9 View commit details
    Browse the repository at this point in the history
  6. Runtime field: test currentTimeMillis

    Adds a test for `runtime_script` who's script contains
    `currentTimeMillis`.
    nik9000 committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    a16b080 View commit details
    Browse the repository at this point in the history