Commit Graph

10962 Commits

Author SHA1 Message Date
Abdon Pijpelink 54f6e4f51b
[DOCS] Remove 'coming in 8.10' from remote cluster API key auth docs (#99462) 2023-09-12 13:25:56 +02:00
Paweł Krześniak 30f6e51804
Update ES|QL (#99467)
To make it more clear let's use different index names for comma-separated index list
2023-09-12 13:13:38 +02:00
Joe Gallo 404aa77849
Fix a typo in the data_stream _stats API documentation (#99438) 2023-09-11 15:13:50 -04:00
Nik Everett 44c3cde48c ESQL: Fix compile
Two PRs cross in the night. Then nothing compiles.
2023-09-11 14:35:05 -04:00
Nik Everett 936e69ddd5
ESQL: Yet more function tests and docs (#99009)
This adds tests, supported types, and a signature image for `to_string`
and `to_version`. It also fixes the resolution of functions who's names
contain an `_`

Finally, it updates the docs for `ceil` to render the image more nicely.
2023-09-11 14:10:17 -04:00
James Rodewig b3646595f1
[DOCS] Add `docker-verify-signature` anchor to Docker docs (#99431)
**Problem:**

Other Elastic doc sets ([Beats](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html), [APM](https://www.elastic.co/guide/en/apm/guide/current/running-on-docker.html)) link to the [Verify the Elasticsearch Docker image signature](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docker.html#docker-verify-signature) section of the Docker docs. This section was removed as part of https://github.com/elastic/elasticsearch/pull/99371. When we bump to the next version, this will create broken links and break the docs build.

**Solution:**
Re-add the anchor so we don't create broken links or break the docs build.

This commit was added to the backports of https://github.com/elastic/elasticsearch/pull/99371:

- https://github.com/elastic/elasticsearch/pull/99429
- https://github.com/elastic/elasticsearch/pull/99430
2023-09-11 12:10:01 -04:00
James Rodewig 22371de7c9
[DOCS] Streamline Docker Compose docs (#99371)
**Problem**:
The [Docker Compose docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-compose-file) are overly long. They currently display the entire length of related `.env` and `docker-compose.yml` files.

**Solution**:
- Rewrite the Docker Compose docs as a procedural with ordered steps.
- Provide download links for the `.env` and `docker-compose.yml` files rather than display them.
- Move info about pulling and verifying Docker images into the [Run Elasticsearch in Docker docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-dev-mode). These steps don't apply to the Docker Compose docs.

Closes https://github.com/elastic/platform-docs-team/issues/186
Depends on https://github.com/elastic/enterprise-search-pubs/pull/3788
2023-09-11 11:05:08 -04:00
Abdon Pijpelink 91759ce592
[DOCS] Some minor ES|QL docs fixes (#99423) 2023-09-11 16:20:10 +02:00
Benjamin Trent 83b70e37ef
Revert "Auto-normalize dot_product vectors at index & query (#98944)" (#99421)
This reverts commit 7b9c367aeb.
2023-09-11 09:33:17 -04:00
Johannes Mahne 4aa0c698f2
Update ilm-shrink.asciidoc (#99366)
Formatting
2023-09-11 12:56:34 +02:00
Abdon Pijpelink 2ef7da53e3
[DOCS] Set up redirect for old anchor (#99401) 2023-09-11 10:13:24 +02:00
dreamquster 04381664c1
ESQL: Implement 'right' function (#98974)
Add the 'right' function, which extracts a substring beginning from its
right end (opposite function of 'left').
---------

Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2023-09-08 17:27:59 +02:00
Abdon Pijpelink af76a3a436
[DOCS] Add 'Troubleshooting an unstable cluster' to nav (#99287)
* [DOCS] Add 'Troubleshooting an unstable cluster' to nav

* Adjust docs links in code

* Revert "Adjust docs links in code"

This reverts commit f3846b1d78.

---------

Co-authored-by: David Turner <david.turner@elastic.co>
2023-09-08 13:42:50 +02:00
Martijn van Groningen 3e3ee42589
Add index.look_back_time setting for tsdb data streams (#98518)
This change adds a `index.look_back_time` index setting that sets the `index.time_series.start_time` setting for the first backing index when a data stream is created.

This allows accepting data that is older for initial indexing without changing the `index.look_ahead_time` setting. This setting also controls the `index.time_series.end_time` setting and would affect rollovers as well.

The default for the `index.look_back_time` is `2h`, which means documents with `@timestamp` up to 2 hours after creation of the data stream are allowed to be indexed. This is the same as is without this change, because `index.look_ahead_time` is used to set `index.time_series.start_time` of the first backing index.

Closes #98463
2023-09-08 11:11:43 +02:00
Stef Nestor 61228b888e
[DOC+] ILM Searchable Snapshot migrations require repository "name" to be the same (#99308)
👋 howdy, team! Expanding reference to [internal](https://github.com/elastic/cloud/pull/118105) update, we've just confirmed ILM requires the repository name to be the same among migrating clusters. This is a hard block for Searchable Snapshots which requires un-Searchable-Snapshotting or redoing migration to resolve.
2023-09-08 10:28:30 +02:00
Marius Iversen 4b41b17772
Update documentation for Set Processor (#99191) 2023-09-07 14:47:07 -04:00
Craig Taverner 9f5ff0cfda
Forward port 8.9.2 release notes (#99323) 2023-09-07 20:35:32 +02:00
James Rodewig 87195052d7
[DOCS] Fix syntax errors in Docker docs (#99313)
**Problem:**
- The `elasticsearch-reset-password` commands in the ES Docker install docs are missing the required `-u` flag
- The `ifeval` blocks in the Kibana section of the ES Docker install docs aren't rendering correctly in released docs.


**Solution:**
- Add the `-u` flag to `elasticsearch-reset-password` examples
- Fix the Asciidoc syntax to correctly render the `ifeval` blocks. Example:

Rel: https://github.com/elastic/elasticsearch/pull/99112
2023-09-07 12:19:25 -04:00
Ioana Tagirta 7cd1987e5d
Make _index optional for pinned query docs (#97450)
Currently pinned queries require either the `ids` or `docs` parameter.
`docs` allows pinning documents from specific indices. However for
`docs` the `_index` field is always required:

```
GET test/_search
{
  "query": {
    "pinned": {
      "organic": {
        "query_string": {
          "query": "something"
        }
      },
      "docs": [
        { "_id": "1" }
      ]
    }
  }
}
```

returns an error:

```
{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "[10:22] [pinned] failed to parse field [docs]",
        "line": 10,
        "col": 22
      }
    ],
    "type": "parsing_exception",
    "reason": "[10:22] [pinned] failed to parse field [docs]",
    "line": 10,
    "col": 22,
    "caused_by": {
      "type": "x_content_parse_exception",
      "reason": "[10:22] [pinned] failed to parse field [docs]",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Required [_index]"
      }
    }
  },
  "status": 400
}
```

The proposal here is to make `_index` optional. I don't think we have a
strong requirement for making `_index` required, when it was initially
introduced in https://github.com/elastic/elasticsearch/pull/74873, we
mostly wanted the ability to pin docs from specific indices.

Making `_index` optional can give more flexibility to use a combination
of pinned documents from specific indices or just document ids. This
change can also help with pinned query rules. Currently pinned query
rules can accept either `ids` or `docs`. If multiple pinned query rules
match and they use a combination of `ids` and `docs`, we cannot build a
pinned query and we would need to return an error. This is because a
pinned query cannot accept both `ids` and `docs`. By making `_index`
optional we would no longer need to return an error when pinned query
rules use a combination of `ids` and `docs`, because we can easily
translate `ids` in `docs`.

The following pinned queries would be equivalent:

```
GET test/_search
{
  "query": {
    "pinned": {
      "organic": {
        "query_string": {
          "query": "something"
        }
      },
      "docs": [
        { "_id": "1" }
      ]
    }
  }
}

GET test/_search
{
  "query": {
    "pinned": {
      "organic": {
        "query_string": {
          "query": "something"
        }
      },
      "ids": [1]
    }
  }
}
```

The scores should be consistent when using a combination of _docs that
might use _index or not - see example

<details>   <summary>Example </summary>

```

PUT test-1/_doc/1 {   "title": "doc 1" }

PUT test-1/_doc/2 {   "title": "doc 2" }

PUT test-2/_doc/1 {   "title": "doc 1" }

PUT test-2/_doc/3 {   "title": "lalala" }

POST test-1,test-2/_search {   "query": {     "pinned": {      
"organic": {         "query_string": {           "query": "lalala"      
}       },       "docs": [         { "_id": "2", "_index": "test-1" },  
{ "_id": "1" }       ]     }   } }

```

response:

```

{   "took": 1,   "timed_out": false,   "_shards": {     "total": 2,    
"successful": 2,     "skipped": 0,     "failed": 0   },   "hits": {    
"total": {       "value": 4,       "relation": "eq"     },    
"max_score": 1.7014124e+38,     "hits": [       {         "_index":
"test-1",         "_id": "2",         "_score": 1.7014124e+38,        
"_source": {           "title": "doc 2"         }       },       {      
"_index": "test-1",         "_id": "1",         "_score": 1.7014122e+38,
// same score as doc with id 1 from test-2         "_source": {         
"title": "doc 1"         }       },       {         "_index": "test-2", 
"_id": "1",         "_score": 1.7014122e+38, // same score as doc with
id 1 from test-1         "_source": {           "title": "doc 1"        
}       },       {         "_index": "test-2",         "_id": "3",      
"_score": 0.8025915, // organic result         "_source": {          
"title": "lalala"         }       }     ]   } }

```

</details>

For query rules, if we have two query rules that both match and use a
combination of `ids` and `pinned`:

```
PUT _query_rules/test-ruleset
{
  "ruleset_id": "test-ruleset",
  "rules": [
    {
      "rule_id": "1",
      "type": "pinned",
      "criteria": [
        {
          "type": "exact",
          "metadata": "query_string",
          "value": "country"
        }
      ],
      "actions": {
        "docs": [
          { "_index": "singers", "_id": "1" }
        ]
      }
    },
    {
      "rule_id": "2",
      "type": "pinned",
      "criteria": [
        {
          "type": "exact",
          "metadata": "query_string",
          "value": "country"
        }
      ],
      "actions": {
        "ids": [
          2
        ]
      }
    }
  ]
}
```

and the following query:

```
POST singers/_search
{
    "query": {
        "rule_query": {
            "organic": {
                "query_string": {
                  "default_field": "name",
                  "query": "country"
                }
            },
            "match_criteria": {
                "query_string": "country"
            },
            "ruleset_id": "test-ruleset"
        }
    }
}
```

then this would get translated into the following pinned query:

```
POST singers/_search
{
    "query": {
        "pinned": {
            "organic": {
                "query_string": {
                  "default_field": "name",
                  "query": "country"
                }
            },
            "docs": [
               { "_index": "singers", "_id": "1" },
               {"_id": 2 }
            ]
        }
    }
}
```

I think we can also simplify the pinned query rule so that it only
receives `docs`:

```
PUT _query_rules/test-ruleset
{
  "ruleset_id": "test-ruleset",
  "rules": [
    {
      "rule_id": "1",
      "type": "pinned",
      "criteria": [
        {
          "type": "exact",
          "metadata": "query_string",
          "value": "country"
        }
      ],
      "actions": {
        "docs": [
          { "_id": "1" },
          { "_id": "2", "_index": "singers" }
        ]
      }
    }
  ]
}
```
2023-09-07 04:39:56 -04:00
Kathleen DeRusso 258d0cb0be
Automatically map floats as dense vector (#98512) 2023-09-06 16:06:29 -04:00
James Rodewig 43abd92b37
[DOCS] Add Docker instructions for Kibana (#99112)
**Problem:**
The [Kibana Docker install docs](https://www.elastic.co/guide/en/kibana/master/docker.html) duplicate the Elasticsearch Docker instructions. This makes the two doc sets harder to maintain. For example, the docs currently use different container names, which makes them incompatible.

**Solution:**
Adds Kibana setup instructions to the Elasticsearch Docker install docs. This will let us eventually merge the two doc sets.

**Issues:**
Rel: https://github.com/elastic/platform-docs-team/issues/182
2023-09-06 07:50:51 -04:00
Abdon Pijpelink 0421c4fe9b
[DOCS] Remote cluster troubleshooting guide (#99128)
* [DOCS] Remote cluster troubleshooting guide

* Fix test failures

* Apply suggestions from code review

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Review feedback

* Group issues under 'common' and 'API key'

* Apply suggestions from code review

Co-authored-by: Yang Wang <ywangd@gmail.com>

---------

Co-authored-by: Yang Wang <ywangd@gmail.com>
2023-09-05 15:10:45 +02:00
Reza Torabi 310af09b6a
Add persian language stemmer (#99106) 2023-09-05 12:13:27 +01:00
Saikat Sarkar c9a2555f09
[Search Relevance] GET search application API should return the alias indices (#99029)
* Add indices to GET search_application endpoint

* Update x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/search/SearchApplication.java

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* Update x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/search/SearchApplication.java

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* Update x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/search/SearchApplication.java

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* Add indices to GET search_application endpoint

---------

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>
2023-09-04 16:43:38 -06:00
István Zoltán Szabó f5dc68abc6
[DOCS] Fine-tunes the reindexing step of the ELSER tutorial. (#99155) 2023-09-04 11:04:58 +02:00
Yang Wang ebe4fe9f15
[Doc] Add links to the new API key based remote cluster page (#99115)
This PR adds links to the new API key based remote cluster page in
multiple places.

Relates: #98330
2023-09-01 06:08:49 -04:00
Abdon Pijpelink 4f1bf97776
[DOCS] Expand the step that enables the remote cluster server (#99084)
* [DOCS] Expand the step that enables the remote cluster server

* Update docs/reference/modules/cluster/remote-clusters-api-key.asciidoc

* Reword

* Reword
2023-09-01 10:35:46 +02:00
Jonathan Buttner 1ca66bde91
[ML] Safely drain deployment request queues before allowing node to shutdown (#98406)
* isSafeToShutdown checks routing table

* Rebalancer changes and tests

* Update docs/changelog/98406.yaml

* Forcing lifecycle tests to avoid over time case

* Changes and remaining tests

* Adding node service changes

* Finishing unit tests

* Adding wait for completion paramater

* Adding stop deployment integration tests

* Cleaning up code

* Fixing stop deployment test

* Fixing string formatter issue and timeout

* Investigating deadlock

* More testing

* More logging

* Prevent model reloading while stopping

* Fixing compile error

* More code clean up

* Adding test for loading model after stopping

* Addressing review feedback

* Fixing a couple shutdown -> shutdownNow tests

* Adding doc changes and refactoring
2023-08-31 15:37:11 -04:00
Joe Gallo 3284903205
Document the redact processor's skip_if_unlicensed option (#99063) 2023-08-31 14:00:12 -04:00
Michael Peterson 649821e992
Support cluster/details for CCS minimize_roundtrips=false (#98457)
This commit tracks progress for each shard search by cluster alias
using a new SearchProgressListener (CCSSingleCoordinatorSearchProgressListener).
Both sync and async CCS searches use this new progress listener when
minimize_roundtrips=false.

Two of the SearchProgressListener method had to be extended to allow tracking
per-cluster took values (TransportSearchAction.SearchTimeProvider) and
whether searches timed out (by passing in QuerySearchResult to the onQueryResult
listener method).

This commit brings parity between minimize_roundtrips=true and false to have
the same _cluster/details sections in CCS search responses.

Note that there are still a few differences between minimize_roundtrips=true and false.
1. The per-cluster took value for minimize_roundtrips=true is accurate, but the
   for 'false' it is only measured at the granualarity of each partial reduce,
   so the per cluster took time is overestimated in basically all cases.
2. For minimize_roundtrips=true, a skip_unavailable=false cluster that disconnects
   during the search or has all searches on all shards fail, will cause the entire
   search to fail. This is (still) not true for minimize_roundtrips=false. The search
   is only failed if the skip_unavailable=false cluster cannot be connected to at the
   start of the search. (This will likely be changed in a follow up ticket that implements
   fail-fast logic for in-progress searches that should fail due to a skip_unavailable=true
   cluster failing.)
3. The shard accounting for minimize_roundtrips=false is always accurate (total shard counts
   are known at the start of the search). For minimize_roundtrips=true, the shard accounting
   is only accurate per cluster unless all clusters have successful (or partially successful)
   searches. For clusters that have failures we do not have shard count info.
2023-08-31 12:56:20 -04:00
Leandro de Lima Camargo e31eed37c5 Fix voting_only:true in node spec docs (#99099) 2023-08-31 17:41:50 +01:00
Stef Nestor 9573f6f1f4
[DOC+] snapshot-restore single index example (#99065)
* [DOC+] snapshot-restore single index example

👋🏼 howdy, team! I'd like to append an example to snapshot-restore a single index. Support usually points users to [this page](https://www.elastic.co/guide/en/elasticsearch/reference/master/restore-snapshot-api.html) but then users attempt the `rename_pattern` example (which makes sense!). I'd like to point them to a more literal "close index > restore on that index" example in the future.

* Fix test failure and reword

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-31 16:23:50 +02:00
Tim baa4e5d6ab
[DOCS] Deduplicate the JVM sizing instructions in Docker documentation (#99079)
- Deduplicates the JVM sizing instructions
- Links the `-m` tag tip section to the JVM sizing instructions
- Replaces the fully typed out container registry to {docker-image}

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-31 08:34:53 -04:00
Abdon Pijpelink 792f9c1647
[DOCS] Remote cluster migration guide (#98999)
* [DOCS] Remote cluster migration guide

* Review feedback

* Clarify that any extra local privileges will be suppressed by the cross-cluster API key’s privileges
2023-08-31 10:24:20 +02:00
Nik Everett b73cc0c529
ESQL: Only generate syntax diagrams locally (#99059)
CI will skip building them. Lot's of CI machines don't have font support
so they can't generate these. But all local machine have a GUI so they
can.

Also, super-lazy initialize the font so CI don't bump into it by
accident.

Closes #99018
2023-08-30 14:44:14 -04:00
Kyle Carter 8ea41ddf1d
Fix link to Lucene docs for TrimFilter (#99050) 2023-08-30 16:34:54 +02:00
Benjamin Trent 7b9c367aeb
Auto-normalize dot_product vectors at index & query (#98944)
`dot_product` requires vectors to be unit-length. Previously, we would
check that vectors were unit-length and throw if they were not. 

Instead, we will now auto-normalize vectors as they are indexed.

`cosine` will continue to behave as usual, not normalizing the vectors.

closes: https://github.com/elastic/elasticsearch/issues/98935
2023-08-30 09:50:49 -04:00
Joe Gallo a354be7b69
Fix a couple of docs typos (#99028) 2023-08-30 09:01:34 -04:00
Bogdan Pintea 9beddb18d6
ESQ: Add metadata fields documentation (#98991)
This adds documentation for the supported metadata fields.

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-30 12:51:31 +02:00
Abdon Pijpelink b6c85dbe82
[DOCS] Update ES|QL Kibana instructions (#98940) 2023-08-30 11:18:49 +02:00
Liam Thompson dfbec46c3d
[Docs] Add link to labs from semantic search overview (#98985) 2023-08-30 10:54:24 +02:00
Stef Nestor 0781bafac1
[DOC+][Hot Spotting] Pull detailed Node Tasks (#98879)
Co-authored-by: David Turner <david.turner@elastic.co>
2023-08-29 14:25:10 -04:00
Stef Nestor de380ea2af
[DOC+] Write threadpool also covers ingest pipelines (#99010)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-29 13:51:18 -04:00
Liam Thompson a3c96caa51
[DOCS] Add link to Elasticsearch labs ELSER Python notebook (#98983)
* Add link to Elasticsearch labs ELSER Python notebook

* Fix typos

* Use {es} variable

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2023-08-29 15:26:00 +02:00
James Rodewig 1301995a46
[DOCS] Remove unneeded `ifeval`s from install docs (#98952)
Problem: The current install docs contain several `ifeval` statements that hide commands and code snippets based on the branch's release state. These statements make the Asciidoc hard to read  and maintain. It also makes doc changes difficult to preview.

Solution: Remove `ifeval` statements that hide commands or code snippets. Leave in any `ifeval` statements used to add warnings.
2023-08-29 07:56:10 -04:00
James Rodewig 73293dca86
[DOCS] Remove unused widgets (#98953)
No-op change to remove a few unused Asciidoc widgets. These aren't referenced or published anywhere in the docs.
2023-08-29 07:53:26 -04:00
dreamquster 2644ccbb8a
Implement the 'left' function in issue #98545 (#98942)
@nik9000  Recheck out the main branch. Refactor the 'left' function to
cut the prefix string in place. But I meet a adversity that left failed
the test case 'testEvaluateInManyThreads'. I find that in multiple
thread situation,  `  EvalOperator.ExpressionEvaluator eval =
evalSupplier.get(); for (int c = 0; c < count; c++) {      
assertThat(toJavaObject(eval.eval(page), 0), testCase.getMatcher()); } `
toJavaObject function return a BytesRef with length=2, content is
[81,89]. However, assertThat function in junit4 receive the BytesRef
parameters that its length is 10. Can you give me some clues? I can't
find which variable is mutual.

Rerun failed test case's command: `gradlew ':x-pack:plugin:esql:test'
--tests
"org.elasticsearch.xpack.esql.expression.function.scalar.string.LeftTests.testEvaluateInManyThreads
{TestCase=Left basic test}" -Dtests.seed=44459C172243712
-Dtests.locale=lv-LV -Dtests.timezone=Asia/Irkutsk -Druntime.java=20`
2023-08-28 13:17:16 -04:00
Nik Everett 4cd7f40712
ESQL: More docs (#98890)
Adds some more typed docs to the ESQL functions.
2023-08-28 11:17:04 -04:00
James Rodewig 29e2e6f141
[DOCS] Simplify single-node Docker instructions (#98886)
Problem:
The current [single-node Docker instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-dev-mode) are overly verbose and contain a lot of unneeded info about security internals. 

Solution:
- Restructure the above docs to focus primarily on actionable steps.
- Test the docs across operating systems (Mac, Linux, Windows) to ensure they work.
2023-08-28 08:54:30 -04:00
James Rodewig 31408bddc1
[DOCS] Add $ELASTIC_PASSWORD env var to install docs (#98898)
- Removes duplicated security autoconfiguration output from the docs. This is difficult to keep updated and makes the docs longer.
- Encourages the user to store the `elastic` password as an environment variable. Users don't need to rely on curl's password prompts.
- Removes unused `api-call-widget` files. These aren't published anywhere in the docs currently.
2023-08-28 08:25:13 -04:00
Alexander Spies ca3dc3a882
ESQL: Add `CEIL` function (#98847)
Add the unary scalar function CEIL.

Analogously to FLOOR,  it rounds up its argument.

- Implement CEIL, add it to the function registry and make sure it is serializable.
- Add csv tests, unit tests and docs.
- Add additional csv tests with different data types and some edge cases for both CEIL and FLOOR
- Add unit tests and update docs for FLOOR.
2023-08-28 12:31:56 +02:00
Nik Everett ff01fb680b
ESQL: Standardize font used in railroad diagrams (#98897)
Locks the railroad diagrams to always use the same font, this one named
`roboto mono`. This makes sure that when we render the railroad diagrams
we always size them the same way. Because everyone has a copy of roboto
mono. Because gradle resolves that dependency.
2023-08-26 14:19:47 -04:00
Nik Everett 649ceb74ab
ESQL docs: generate references for functions (#98856)
This generates a "railroad diagram" svg image that can be embedded into
the docs for any function to explain it's syntax. It's basic, but it's
something we can iterate on.

It also generates a table of supported types from the list of types that
we test. It can be included in the docs for reference as well.
2023-08-25 09:07:25 -04:00
Yang Wang f307e6fedd
[Docs] Document IP filtering for RCS 2.0 (#98553)
This PR adds documentation for RCS 2.0 IP filtering.

Relates: #98472
2023-08-24 23:23:40 -04:00
Abdon Pijpelink 1955bd8ad4
[DOCS] New docs for remote clusters using API key authentication (#98330)
* New docs structure for remote clusters

* Fix broken cross-book link errors

* More broken cross-book link errors

* Remove redirects for new pages

* Link to generic remote cluster docs instead

* Drop 'API' from the abbreviated title

* Add 'Establish trust with a remote cluster' section

* Restructure 'Establish trust' section into Prprequisite/local/remote instructions

* Add 'Configure roles and users' section

* Add 'Connect to a remote cluster' section

* Move version compatibility to prerequisites

* Fix test errors

* Incorporate review feedback

* Mention version 8.10 or later in the intro for API keys

* Add license prerequisite
2023-08-24 12:30:03 +02:00
Mary Gouseti b9b818e28e
Allow explain data stream lifecycle to accept a data stream. (#98811)
Currently the `GET target/_lifecycle/explain` API only works for
indices. In this PR we extend this behaviour to allow the target to be a
data stream so we can get the overview lifecycle status for all the
backing indices of a data stream.
2023-08-24 06:29:09 -04:00
Dianna Hohensee a25e176692
Add node "roles" to allocation explain response (#98550)
Report node "roles" in the /_cluster/allocation/explain response.
Nodes with limited sets of roles may affect shard distribution in ways
users did not originally consider, so it is helpful to surface this
information along with node allocation decision explanations.
2023-08-23 08:30:35 -04:00
István Zoltán Szabó 947128e76d
[DOCS] Fixes NOTE display error. (#98783) 2023-08-23 12:18:54 +02:00
Peter Dyson ef7b7ccded
[DOCS] mention closed indices are included by default for snapshot (#98766) 2023-08-23 10:41:35 +02:00
Lee Hinman 815d596daa
Add 'dataset' size to cat indices and cat shards (#98622)
* Add 'dataset' size to cat indices and cat shards

This adds the `dataset` computed size for the `/_cat/indices` and `/_cat/shards` APIs. This new
column is reported by default.

Resolves #95092
2023-08-22 15:36:32 -06:00
Nik Everett 65ea90d3fd
ESQL: LEAST and GREATEST functions (#98630)
Adds `LEAST` and `GREATEST` functions to find the min or max of the
values in many columns.
2023-08-22 14:15:04 -04:00
Bogdan Pintea 372458c9fd
ESQL: date_trunc(): swap order of arguments (#98624)
Swap arguments order so that the range parameter is first and datetime
one second, inline with other languages.
2023-08-22 18:20:05 +02:00
Andrei Dan 01ed7de99f
GA the data stream lifecycle (#98644)
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
2023-08-21 17:28:54 +01:00
Abdon Pijpelink 68aee20d01
[DOCS] Removing 'coming' admonition from 8.9.1 release notes (#98658) 2023-08-21 14:05:42 +02:00
Abdon Pijpelink 2bbc1df9bd
[DOCS] Remove 'coming' notice from 8.8.2 release notes (#98659) 2023-08-21 14:05:15 +02:00
Abdon Pijpelink d04c0f7976
Fix response for IS NULL (#98671)
The response shown for IS NULL here is actually the response for the IS NOT NULL snippet. This PR fixes that.
2023-08-21 13:20:36 +02:00
Abdon Pijpelink 4d7193d76d
[main] Update docs for v8.9.1 release (#98416) (#98655)
* Update docs for v8.9.1 release (#98416)

(cherry picked from commit 7985f8ef0f)

* Resolve merge conflicts

---------

Co-authored-by: Volodymyr Krasnikov <129072588+volodk85@users.noreply.github.com>
2023-08-21 10:53:39 +02:00
Nik Everett 44e61341f2
ESQL: COALESCE function (#98542)
This adds a `COALESCE` function that returns the first non-null value.
2023-08-17 13:51:44 -04:00
Roberto Seldner 79d2879564
Add deprecated note for `balanced` allocator (#98610)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-17 12:50:52 -04:00
Nik Everett a380e8c369
ESQL: LTRIM, RTRIM and fix unicode whitespace (#98590)
Here we add support for the following two ESQL functions:
* LTRIM: remove leading spaces from a string
* RTRIM: remove trailing spaces from a string

We also fix an issue with the handling of unicode white spaces. We
make use of unicode code points to identify unicode whitespace
characters instead of relying on ASCII codes.

Moreover, iterating bytes in a Unicode string needs to consider
that some Unicode characters are encoded using multiple bytes.
2023-08-17 11:30:12 -04:00
Craig Taverner aad16b7d6b
Simple ESQL pow() docs fixes after re-reviewing (#98601) 2023-08-17 17:29:06 +02:00
Kathleen DeRusso 8c12a7b7cd
Query rules docs clarification (#98605)
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
2023-08-17 11:11:49 -04:00
Carlos Delgado 2b838ae853
Dense vector field types are indexed by default (#98268)
* First version

* Spotless, I liked my version better

* Fix param default values

* Add a supplier for default value to ensure it's calculated correctly

* Can't improve this without breaking tests

* Added checks for not specifying a body in PUT requests

* Fix default provider for enum params

* Added yaml test

* Changed docs and fix TODO

* Removing synonyms changes

* Added separate methods for providing default value as suppliers in enums

* Fixed test

* Add a supplier for default value to ensure it's calculated correctly

* Added checks for not specifying a body in PUT requests

* Remove synonyms changes

* Remove some supplier changes

* Better call enumParam with supplier version

* Fix compiler error on supplier

* Apply validators or requires depending on index version

* Solved BWC tests that involved using validators instead of requiresParameters

* Add tests

* Spotless

* Update docs/changelog/98268.yaml

* Update changelog

* Update docs/changelog/98268.yaml

* PR comments

* PR feedback

* Serialize index only for new index versions

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-17 10:53:14 -04:00
Craig Taverner dfe9bdc45f
Simple grammar fix for MVT docs (#98591) 2023-08-17 16:10:26 +02:00
ChrisHegarty 21dcb75836 Merge upstream 2023-08-17 11:40:42 +01:00
Simon Cooper 9538208fb7
Fix shard-stores doc test (#98581)
The replacement wasn't actually doing anything due to different JSON types
2023-08-17 11:38:31 +01:00
Nick Chow 5de0a9013f
Documentation update that fixes a query rules code example (#98540)
* Change example field in rule query guide

* Change fuzzy to contains to get tests to work

---------

Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>
2023-08-16 15:14:32 -07:00
Andrei Stefan 014bd33f45
ESQL: replace the is_null function with IS NULL and IS NOT NULL predicates (#98412) 2023-08-16 20:19:40 +03:00
ChrisHegarty d7c0f623bf Merge upstream 2023-08-16 15:57:21 +01:00
Michael Peterson 4d3fb8d993 Bump to version 8.11.0 2023-08-16 10:35:00 -04:00
Kostas Krikellas b498ce9ff4
`Sqrt` function for ESQL (#98449)
* Sqrt function for ESQL

Introduces a unary scalar function for square root, which is a thin
wrapper over the Java.Math implementation.

* Fix area for ESQL integration changelog.

* Restore changelog.

* Restore area in changelog.
2023-08-16 16:33:30 +03:00
ChrisHegarty 107174051b Merge upstream 2023-08-16 08:56:40 +01:00
James Baiera 7d990d5a09
Allow custom geo ip database files to be downloaded (#97850)
This PR extends the assumptions we make about database file availability to all database file 
names instead of the default ones we host at Elastic. When creating a geo ip processor with 
a database name that is not recognized we unilaterally convert the processor to one that 
tags documents with a missing database message until the database file requested is 
downloaded or provided via the manual configuration route. This allows a pipeline to be 
created and for the download service to be started, potentially sourcing the needed files.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-16 00:31:51 -04:00
Yang Wang b337f9b6f3
[Docs] Misc doc update for RCS 2.0 (#98472)
This PR adds docs for the following items: * Remote indices privileges *
Remote cluster network settings * Remote cluster security settings * New
privileges * New response field for RemoteInfo API

List of preview pages: * [Remote indices in defining
roles](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/defining-roles.html#roles-remote-indices-priv)
* [Remote indices in PutRole
API](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-api-put-role.html#security-api-put-role-request-body)
* [Remote cluster server SSL
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-settings.html#_remote_cluster_server_api_key_based_model_tlsssl_settings)
* [Remote cluster client SSL
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-settings.html#_remote_cluster_client_api_key_based_model_tlsssl_settings)
* [Remote cluster network
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/modules-network.html#remote-cluster-network-settings)
and
[here](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/modules-network.html#common-network-settings)
* [Remote cluster credentials
setting](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/remote-clusters-settings.html)
* [New
privileges](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-privileges.html)
* [New response field for RemoteInfo
API](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html#cluster-remote-info-api-response-body)
2023-08-15 20:11:21 -04:00
Jake Landis 80cc651614
Fix jwt and oidc doc (#97942)
This commit corrects the following issues with JWT and OIDC `jwkset_path` documentation:
* only https is supported for the JWT realm (OIDC support both https and http)
* JWT realm does not use a file watcher to reload the file every 5 seconds
* simplify "path" to  "file name" ..technically it is resolved path, but 99% of the time it will be just 
     a file name in the config directory and "path" is ambiguous
* remove special mention of using the absolute path in cloud. .. this is an unnecessary implementation 
     detail and the only setting (of many) that calls out the cloud config directly by absolute path
* ensure the 2 different JWT documentations are the same
* make mention of when the JWT file will be reloaded (it is not backed by the file watcher, only OIDC is)
2023-08-15 15:50:17 -05:00
amyjtechwriter 7e907f804a
[DOCS]Corrections for index-mgmt page. (#98481)
* Corrections for index-mgmt page.

* Update docs/reference/indices/index-mgmt.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-15 16:38:04 +01:00
Abdon Pijpelink e766050edc
[DOCS] Update geohash_grid agg field description (#98494) 2023-08-15 15:59:16 +02:00
Abdon Pijpelink b4ee955bb1
[DOCS] Add tests to behavioral analytics code snippets (#98378) 2023-08-15 10:10:37 +02:00
ChrisHegarty 8a4e42358b Merge upstream 2023-08-15 09:01:43 +01:00
Leaf-Lin db078f78dd
Update post-analytics-collection-event.asciidoc (#97826)
* Update post-analytics-collection-event.asciidoc

Update API endpoint. Instead of `click`, it should be `search_click`. 

Expanded on request body in the API as well.

* Update post-analytics-collection-event.asciidoc

* Update post-analytics-collection-event.asciidoc

* Update post-analytics-collection-event.asciidoc
2023-08-15 09:08:14 +10:00
ChrisHegarty 2e4440ff1c Remove space in dissect feature list 2023-08-14 14:54:37 +01:00
ChrisHegarty 7cb310b9d0 Merge upstream 2023-08-14 09:55:02 +01:00
Yang Wang d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
Keith Massey b155444b95
Fixing data stream lifecycle documentation links that break clients (#98365) 2023-08-11 10:30:33 -05:00
Jim Ferenczi a5d21ce800
Add the total dense vector count in the indices stats output (#98275)
This change adds the total dense vector count to the output of the indices stats.
This is useful for observability in order to track the number of indexed vectors
in a cluster.

---------

Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
2023-08-11 23:17:38 +09:00
Abdon Pijpelink cac9eef000
[DOCS] Set up temporary redirects for new remote clusters docs (#98398) 2023-08-11 15:40:06 +02:00
Felix Barnsteiner c0f10b1cd2
[DOCS] ILM force merge action doesn't make index read-only (#98382) 2023-08-11 08:38:55 -04:00
ChrisHegarty d07492d712 Merge upstream 2023-08-11 12:10:23 +01:00
Mary Gouseti e71ea6e6d7
Add data stream lifecycle by default (#97823)
In this PR we enable all new data streams to be managed by the data
stream lifecycle by default. This is implemented by adding an empty
`lifecycle: {}` upon new data stream creation. 

Opting out is represented by a the `enabled` flag:

```
{
  "lifecycle": {
    "enabled": false
  }
}
```

This change has the following implications on when is an index managed
and by which feature:

| Parent data stream lifecycle| ILM| `prefer_ilm`|Managed by|
|----------------------------|----|----------------|-| | default | yes|
true| ILM| | default | yes| false| data stream lifecycle| |default |
no|true/false|data stream lifecycle| |opt-out or
missing|yes|true/false|ILM| |opt-out or missing|no|true/false|unmanaged|

Data streams that have been created before the data stream lifecycle is
enabled will not have the default lifecycle.

Next steps: - We need to document this when the feature will be GA
(https://github.com/elastic/elasticsearch/issues/97973).
2023-08-11 06:28:37 -04:00
James Rodewig c1eb581da8
[DOCS] Force merge doesn't mark index as read-only (#98357) (#98366)
(cherry picked from commit d4c6208727)

Co-authored-by: Gilad Gal <gilad.gal@elastic.co>
2023-08-10 18:28:52 -04:00
Carlos Delgado c596f121b4
Synonyms Overview Documentation (#98202) 2023-08-10 18:07:12 +02:00
Ioana Tagirta b2ba56a804
Search Applications: Remove inconsistent indices warning (#98348)
* Remove inconsistent indices warning

* Revert docs changes for inconsistent indices warning
2023-08-10 16:14:08 +02:00
Abdon Pijpelink 21ef4f3629
[DOCS] Update CCS compatibility matrix for 8.10 (#98341) 2023-08-10 15:57:47 +02:00
Keith Massey 841050043e
Hiding data stream lifecycle documentation in released docs (#98334) 2023-08-10 08:18:05 -05:00
Chris Hegarty c300712dfe
Remove docs workaround (#98346)
This commit removes a temporary workaround that was added for the doc root.
2023-08-10 13:54:04 +01:00
Luca Cavanna 4023454483
Introduce executor for concurrent search (#98204)
This commit enables concurrent search execution in the DFS phase, which is going to improve resource usage as well as performance of knn queries which benefit from both concurrent rewrite and collection.

We will enable concurrent execution for the query phase in a subsequent commit. While this commit does not introduce parallelism for the query phase, it introduces offloading sequential computation to the newly introduced executor. This is true both for situations where a single slice needs to be searched, as well as scenarios where a specific request does not support concurrency (currently only DFS phase does regardless of the request). Sequential collection is not offloaded only if the request includes aggregations that don't support offloading: composite, nested and cardinality as their post collection method must be executed in the same thread as the collection or we'll trip a lucene assertion that verifies that doc_values are pulled and consumed from the same thread.

## Technical details

This commit introduces a secondary executor, used exclusively to execute the concurrent bits of search. The search threads are still the ones that coordinate the search (where the caller search will originate from), but the actual work will be offloaded to the newly introduced executor.

We are offloading not only parallel execution but also sequential execution, to make the workload more predictable, as it would be surprising to have bits of search executed in either of the two thread pools. Also, that would introduce the possibility to suddenly run a higher amount of heavy operations overall (some in the caller thread and some in the separate threads), which could overload the system as well as make sizing of thread pools more difficult.

Note that fetch, together with other actions,  is still executed in the search thread pool. This commit does not make the search thread pool merely a coordinating only thread pool, It does so only for what concerns the IndexSearcher#search operation itself, which is though a big portion of the different phases of search API execution.

Given that the searcher blocks waiting for all tasks to be completed, we take a simple approach of introducing a thread pool executor that has the same size as the existing search thread pool but relies on an unbounded queue. This simplifies handling of thread pool queue and rejections. In fact, we'd like to guarantee that the secondary thread pool won't reject, and delegate queuing entirely to the search thread pool which is the entry point for every search operation anyway. The principle behind this is that if you got a slot in the search thread pool, you should be able to complete your search, and rather quickly.

As part of this commit we are also introducing the ability to cancel tasks that have not started yet, so that if any task throws an exception, other tasks are prevented from starting needless computation.

Relates to #80693
Relates to #90700
2023-08-10 12:40:36 +02:00
ChrisHegarty 1e53a5346a Merge branch 'main' into feature/esql 2023-08-10 11:35:15 +01:00
Ed Savage 3682a88199
[ML] Update documentation regarding versioning. (#98320)
Update the ml and transform reference documentation to provide information regarding the new versioning schemes independent from the product versions.

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2023-08-10 11:20:58 +01:00
Martijn van Groningen 297a0134ce
Add tsdb metrics builtin component template (#97602)
Fleet is currently hard coded to set index.codec to best_compression (deflate compression). This is good for most data streams, except for data streams were tsdb is enabled. Ideally Fleet doesn't need to set this setting at all and Elasticsearch's default would be good. But unfortunately this isn't the case. It default to default (lz4 - optimised for speed), which in would mean much higher disk space usage. Ideally the default would be default when synthetic source is enabled and otherwise best_compression. Changing this now, would mean a breaking change.

Instead Fleet like to depend on Elasticsearch's internal component templates. To at least abstract some of the internal details away. The metrics-settings is ok for non tsdb, but there is no component template for tsdb metrics. This PR adds this.

Relates to elastic/kibana#160288
2023-08-10 16:19:06 +07:00
Kuni Sen 225503a447
Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format (#98338)
* Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format

Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format

* Update docs/reference/mapping/dynamic/field-mapping.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-10 16:44:44 +09:00
Stef Nestor 93d36db454
[DOC+] ILM min_age interpretation (#98245)
* [DOC+] ILM min_age interpretation

👋 hiya, team!

From the time y'all helped me write this [ILM Troubleshooting blog](https://www.elastic.co/blog/troubleshooting-elasticsearch-ilm-common-issues-and-fixes) in 2021 and we later ported errors to [this doc](https://www.elastic.co/guide/en/elasticsearch/reference/master/index-lifecycle-error-handling.html) via https://github.com/elastic/elasticsearch/issues/75849, the remaining top-gotcha user's raise is "Common issue 3" that ILM's `min_age` calculates off rollover time fallback index creation time.

This PR cross-pollinates the blog quote into the docs so that Support can link it to users and so it becomes Google-able.

> Common issue 3: min_age calculation clarification
> When working with customers, I have seen confusion about how min_age works. The min_age must increase between subsequent phases. If rollover is used, min_age is calculated off the rollover date. This is because rollover generates a new index and the new index’s creation date is used in the calculation. Otherwise, min_age is calculated off the original index’s creation date.

* Apply suggestions from code review

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-09 16:41:49 +02:00
Abdon Pijpelink e009e40660
[DOCS] Fix HDR parameter for the percentile agg (#98318) 2023-08-09 14:38:53 +02:00
Abdon Pijpelink 8ac9fef3b7
[DOCS] Add 'boost' paramater to match query (#98108) 2023-08-09 14:28:27 +02:00
Kathleen DeRusso 0437416c33
Tech debt: Add tests to documentation for query rules, search applications (#98266)
* Add tests for query rules

* More tests

* Fix search app tests

* Fix tests

* Add teardown to tests

* Add tests for list search apps call

* Update test in get search application

* Tweak stack trace

* Make response match in test

---------

Co-authored-by: carlosdelest <carlos.delgado@elastic.co>
2023-08-09 08:01:52 -04:00
Carlos Delgado 727d0fad02
Synonyms bugfix - prevent index not found when system index has not been created (#98280) 2023-08-09 08:55:20 +02:00
Abdon Pijpelink 0dd92f17a7 Merge pull request ESQL-1552 from abdonpijpelink/docs-tech-preview-admonition
[DOCS] Mark ES|QL as 'tech preview' and update supported types list
2023-08-08 19:26:34 +02:00
elasticsearchmachine 3ccdab8da4 Merge pull request ESQL-1553 from elastic/main
🤖 ESQL: Merge upstream
2023-08-08 13:19:23 -04:00
Abdon Pijpelink 0c14d5d332 Update types list 2023-08-08 18:11:59 +02:00
Salvatore Campagna d0b2f650df
Enable all remaining metric aggregations on counters (#97974)
Here we enable aggregations previously not allowed on fields of type counter.
The decision of enabling such aggregations even if the result is "meaningless"
for counters has been taken to favour TSDB adoption.

Aggregations now allowed, other than the existing ones, include:
* avg
* box plot
* cardinality
* extended stats
* median absolute deviation
* percentile ranks
* percentiles
* stats
* sum
* value count

I included tests for the weighted average and matrix stats aggregations too.

Resolves #97882
2023-08-08 17:47:47 +02:00
Abdon Pijpelink 47566f4276 Update supported types list 2023-08-08 17:47:45 +02:00
Abdon Pijpelink 843eacab27 Add tech preview admonition 2023-08-08 17:29:24 +02:00
Kathleen DeRusso 93dd279dea
Docs: Link to search with query rules page from query rules DSL (#98269)
* Link to search with query rules page from query rules DSL

* Update docs/reference/query-dsl/rule-query.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-08-08 08:50:53 -04:00
David Turner 0f6a217ed8
Fix admonition about initial_master_nodes (#98242)
Admonition paragraphs cannot be combined with a `+` continuation mark.
This commit fixes the formatting by using an admonition block instead.
2023-08-08 11:50:36 +01:00
David Turner 847ec45baa
Remove bound on SEARCH_COORDINATION default size (#98264)
Today by default the `SEARCH_COORDINATION` pool is sized at half the
allocated processors, or five if there are more than ten CPUs. Yet, if
we scale up a node to have more than ten CPUs, we probably want to scale
up the number of search coordination threads to match. This commit
removes the limit of five threads.
2023-08-08 07:09:25 +01:00
elasticsearchmachine 9d1e4bcc2a Merge pull request ESQL-1546 from elastic/main
🤖 ESQL: Merge upstream
2023-08-07 13:27:50 -04:00
Michael Peterson 169f7d1774
Add specific cluster error info, shard info and additional metadata for CCS when minimizing roundtrips (#97731)
For CCS searches with ccs_minimize_roundtrips=true, when an error is returned, it is unclear which cluster
caused the problem. This commit adds additional accounting and error information to the search response
for each cluster involved in a cross-cluster search.

The _clusters section of the SearchResponse has a new details section added with an entry for each cluster
(remote and local). It includes status info, shard accounting counters and error information that are added
incrementally as the search happens.

The search on each cluster can be in one of 5 states:
RUNNING
SUCCESSFUL - all shards were successfully searched (successful or skipped)
PARTIAL - some shard searches failed, but at least one succeeded and partial data has been returned
SKIPPED - no shards were successfully searched (all failed or cluster unavailable) when skip_unavailable=true
FAILED - no shards were successfully searched (all failed or cluster unavailable) when skip_unavailable=false

A new SearchResponse.Cluster object has been added. Each TransportSearchAction.CCSActionListener
(one for each cluster) has a reference to a separate Cluster instance and updates once it gets back 
information from its cluster.

The SearchResponse.Clusters object only uses the new Cluster object for CCS minimize_roundtrips=true.
For local-only searches and CCS minimize_roundtrips=false, it uses the current  Clusters object as before.

Follow on work will change CCS minimize_roundtrips=false to also use the new Cluster model and update
state in the _cluster/details section.

The Cluster objects are immutable, so a CAS operation is required to swap in new state to the 
map of Cluster objects held by the `SearchResponse.Clusters` class. This concurrency model is 
a little bit of overkill for the minimize_roundtrips=true use case, but it will be necessary for 
supporting minimize_roundtrips=false, since updates there will be done per shard, not per cluster.
2023-08-07 12:32:06 -04:00
Kathleen DeRusso 4367c3f31c
Add query rulesets counts to enterprise search telemetry (#98071) 2023-08-07 10:38:12 -04:00
Abdon Pijpelink 2f320f1bf6
Revert "Revert "[DOCS] Add docs for EQL missing events"" (#98029)
* Revert "Revert "[DOCS] Add docs for EQL missing events (#97372)" (#98028)"

This reverts commit 46c81938d9.

* Changed response for missing events
2023-08-07 15:19:08 +02:00
Abdon Pijpelink 962c607ade
[DOCS] Fix formatting issue in cardinality-aggregation.asciidoc (#98175)
* [DOCS] Fix formatting issue in cardinality-aggregation.asciidoc

Fixes a header not rendering properly because of a missing newline.

* Update docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc

* More issues

* More issues

* Update docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

---------

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-07 10:38:45 +02:00
elasticsearchmachine 1fdccf3554 Merge pull request ESQL-1543 from elastic/main
🤖 ESQL: Merge upstream
2023-08-05 01:22:58 -04:00
David Kilfoyle 174ea9645c
[Docs] Fix links to Cloud snapshot and restore docs (#98228) 2023-08-04 18:01:46 -04:00
David Kilfoyle 4d3069a986
Fix broken links to Cloud snapshot restore info (#98213) 2023-08-04 16:38:27 -04:00
elasticsearchmachine f22804abea Merge pull request ESQL-1542 from elastic/main
🤖 ESQL: Merge upstream
2023-08-04 13:17:09 -04:00
Carlos Delgado 8e64359fb1
Change cluster stats synonyms keys (#98126) 2023-08-04 17:28:12 +02:00
Abdon Pijpelink 91d0e11ab9
[DOCS] Update manual downsampling documentation to use TSDS (#97976)
* [DOCS] Update manual downsampling documentation to use TSDS

* Swap manual and ILM downsampling examples in nav

* Typo

* Update prerequisites based on review feedback

* Warn against deleting the old backing index.

* Clarify counter/gauge results

* Mention that the downsampled type is 'aggregate_metric_double'
2023-08-04 09:39:14 +02:00
elasticsearchmachine 85dd9719fc Merge pull request ESQL-1536 from elastic/main
🤖 ESQL: Merge upstream
2023-08-04 01:20:52 -04:00
James Rodewig e00b354c26
[DOCS] Remove breaking change tags (#98144)
With https://github.com/elastic/stack-docs/pull/2495 merged, we no longer reuse breaking changes in the Stack Install/Upgrade guide.

This removes the related `notable-breaking-changes[]` tags from the 8.9+ docs and updates the RN generator template.

## Out of scope
With the removal of these tags, we may no longer need the `notable` property for changelog entries and can likely simplify the logic for the [BreakingChangesGenerator](https://github.com/elastic/elasticsearch/blob/main/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/BreakingChangesGenerator.java). Updating those files is outside the scope of this PR. I've opened https://github.com/elastic/elasticsearch/issues/98145 to track that work.
2023-08-03 15:23:47 -04:00
Mayya Sharipova 2076183dee
Move vectors of > 1024 dims out of experimental (#96850)
With moving max dims check to codec from Lucene 9.8, we will always
have a way to provide our own codec with the max dims
defined by us.
2023-08-03 14:30:14 -04:00
elasticsearchmachine 6ff458b3bf Merge pull request ESQL-1530 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 13:23:09 -04:00
Abdon Pijpelink 5947f3b455
[DOCS] Clarify TSDS/synthetic source/runtime field restrictions (#97980) 2023-08-03 18:28:08 +02:00
Abdon Pijpelink efc0cb5422
[DOCS] Node stats API: fix descriptions of 'cache_size' and 'cache_count' (#98092) 2023-08-03 09:45:22 +02:00
elasticsearchmachine 04908b9e15 Merge pull request ESQL-1527 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 01:18:46 -04:00
Kathleen DeRusso 23e35d5687
[Query Rules] Add documentation for rule_query (#97667)
* Add docs for rule query

* Add test

* Fix formatting in rule query dsl

* Remove query string as required from rule query docs

* PR feedback

* Update with API changes

* Expand and clarify 'search using query rules' doc

* Clean up wording

* Update put syntax

* Fix examples after refactor

* Update docs/reference/query-dsl/rule-query.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

* PR feedback + update privilege

* PR feedback

* More PR feedback

* Small correction

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-02 15:56:06 -04:00
Nik Everett 24b2d16f95 Add `to_degrees` and `to_radians` functions (ESQL-1496)
This adds the `to_degrees` and `to_radians` functions. It uses the
"convert" function framework because that just felt right - these
convert between radians and degrees after all.
2023-08-03 04:23:15 +10:00
elasticsearchmachine 5bc6ae21ba Merge pull request ESQL-1525 from elastic/main
🤖 ESQL: Merge upstream
2023-08-02 13:17:36 -04:00
Nik Everett c1601f5a9c Add remaining trigonometric functions (ESQL-1518)
Adds the remaining trigonomentric functions, `ACOS`, `ASIN`, `ATAN`, and
`ATAN2`.

---------

Co-authored-by: Bogdan Pintea <pintea@mailbox.org>
2023-08-03 01:12:10 +10:00
Abdon Pijpelink 5ba98c569e
[DOCS] Skip testing the response of EQL sequence sample requests (#98112) 2023-08-02 15:58:52 +02:00
Carlos Delgado e300319afb
Synonym Rules APIs docs (#98064) 2023-08-02 14:11:30 +02:00
Ioana Tagirta f3d0073066
Search Applications: remove indices array and rely on alias (#98036)
* Stop returning the indices list for GET search app

* Stop returning the indices list for the list search app API

* Stop storing indices list

* Remove indices from system index mapping

* Check for alias in PUT rest tests

* Documentation changes

* Do not check for alias existence since we are already doing get alias
2023-08-02 10:00:39 +02:00
Nik Everett 7c30146858 Add query to esql task (ESQL-1511)
This adds the `query` to the main ESQL task so you can see long running
queries. And adds some docs about it including an example of cancelling
a query.

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-02 05:30:36 +10:00