Commit Graph

786 Commits

Author SHA1 Message Date
Ignacio Vera 397d52e24b
Allow docvalues-only search on geo_shape (#94396)
allows searching on a geo_shape field type when the field is not indexed (index: false) but just doc values are enabled.
2023-03-08 16:30:06 +01:00
Hritik Kumar f5af004117
Support `ignore_malformed` in boolean fields (#93239)
This PR enables the `ignore_malformed`parameter to be accepted as an option in 
boolean field mappings. Support for synthetic source is not added yet, so if
`ignore_malformed` is set to true, synthetic source isn't supported.

Closes #89542
2023-02-21 18:22:10 +01:00
Przemyslaw Gomulka b0ba832791
[doc] Mention dates_nanos in dates field type page (#93828) 2023-02-15 16:58:24 +01:00
Benjamin Trent e8c5ed46c6
Fixing our docs for vector sizing calculation (#93703) 2023-02-13 07:52:53 -05:00
Benjamin Trent 323a13ac3f
Add `term` query support to rank_features mapped field (#93247)
This adds term query capabilities for rank_features fields. term queries against rank_features are not scored in the typical way as regular fields. This is because the stored feature values take advantage of the term frequency storage mechanism, and thus regular BM25 does not work.

Instead, a term query against a rank_features field is very similar to linear rank_feature query. If more complicated combinations of features and values are required, the rank_feature query should be used.
2023-02-01 13:32:13 -05:00
David Turner ce736dd0e0 Revert "enhancement: boolean field to support ignore_malformed (#90122)"
This was merged in error without a full CI run, and has some issues.

This reverts commit edcdc43519.
This reverts commit 26c0a35558.
2023-01-25 15:09:59 +00:00
Hritik Kumar edcdc43519
enhancement: boolean field to support ignore_malformed (#90122)
* enhancement: boolean field to support ignore_malformed

* fix: changes in current builder for BooleanFieldMappers within tests files.

* Updating documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Amy Jonsson <amy.jonsson@elastic.co>
2023-01-25 13:56:50 +00:00
Christos Soulios a183843893
[DOCS] Fix incorrect statement for `aggregate_metric_double` field type (#92961)
Documentation incorrectly states that all aggregations are supported by
the `aggregate_metric_double` field.

This PR rectifies this  error.

Closes #92236
2023-01-16 12:33:20 -05:00
Dale Visser 1a9150dddb [Docs] Differentiate runtime field and indexed field (#91057)
Clarify wording of upgrading runtime fields to index field.
2023-01-13 17:05:26 +01:00
Abdon Pijpelink 85e965a35c
[DOCS] Remove experimental flag from index vectors for kNN search docs (#92867) 2023-01-12 15:57:28 +01:00
Nicolas Ruflin 71739416cf
[Docs] Add more details to the `index` option docs (#92606)
Docs around the `index` option were not very precise. The term "typical" was used without describing for which fields querying is still available when `index: false` is set. But more precise docs existed in the `doc_values` documentation found here for the index option: https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html This docs were mostly copied over.

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-01-04 09:09:21 +01:00
Christoph Büscher 8067f01d48
Runtime fields to optionally ignore script errors (#92380)
Currently Elasticsearch always returns a shard failure once a runtime error arises from using a runtime field, the exception being script-less runtime fields. This also means that execution of the query for that shard stops, which is okay for development and exploration. In a production scenario, however, it is often desirable to ignore runtime errors and continue with the query execution.

This change adds a new a new on_script_error parameter to runtime field definitions similar to the already existing
parameter for index-time scripted fields. When `on_script_error` is set to `continue`, errors from script execution are effectively ignored. This means affected documents don't show up in query results, but also don't prevent other matches from the same shard. Runtime fields accessed through the fields API don't return values on errors, aggregations will ignore documents that throw errors.

Note that this change affects scripted runtime fields only, while leaving default behaviour untouched. Also, ignored errors are not reported back to users for now.

Relates to #72143
2022-12-23 09:29:12 +01:00
Madhusudhan Konda af65e71114
The exception is inserted in a code block (#90325)
* The exception is inserted in a code block

* Update docs/reference/mapping/types/text.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-12-21 17:22:35 +01:00
QY 7b17e1b5dc
[DOCS] Remove outdated note in `Date field type` (#92408)
Negative epoch timestamps are supported in 8.2.0 by pr #80208
2022-12-20 14:01:11 +01:00
Nik Everett b9bb7252be
Docs: synthetic _source can't params._source (#91630)
This documents that `params._source` isn't available for synthetic
`_source` indices and suggests to instead use `doc['foo']` or
`field('foo')`.
2022-11-22 15:23:30 -05:00
Nik Everett 7249e4bd93
Revert "Revert "Update tech preview notice for synthetic source (#91474)" (#91589)" (#91669)
This reverts commit ddef28bd2f.
2022-11-21 09:54:34 -05:00
Anthony McGlone 47e3b89176
[DOCS] Clarify multi-field addition requires update by query for existing documents (#91541)
* [DOCS] Clarify multi-field addition requires update by query for existing documents

* Update docs/reference/mapping/params/multi-fields.asciidoc

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

* Update docs/reference/indices/put-mapping.asciidoc

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

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-11-18 12:38:04 +01:00
Nik Everett 02138dc70a
Docs: synthetic _source can remove some arrays (#91632)
Synthetic _source's array flattening activities can remove some arrays
entirely. Specifically:
```
{
  "foo": [
    {
      "bar": 1
    },
    {
      "baz": 2
    }
  ]
}
```

Turns into:
```
{
  "foo": {
    "bar": 1,
    "baz": 2
  }
}
```

See, no more array! It's because the values are flattend to the leaf
fields and didn't have multiple values. This is implied by the docs we
had, but sure wasn't obvious. So now it's documented specifically.
2022-11-16 15:19:42 -05:00
David Kilfoyle ddef28bd2f
Revert "Update tech preview notice for synthetic source (#91474)" (#91589)
This reverts commit c9b13f5f53.
2022-11-15 09:33:40 -05:00
Jack Conradson 89e0a6d249
Add fielddata and scripting support for byte-sized vectors (#91184)
This change adds support fielddata and subsequently scripting for byte vectors. This is a follow up to 
#90774 and completes the initial work for #89784.
2022-11-10 15:00:04 -08:00
David Kilfoyle c9b13f5f53
Update tech preview notice for synthetic source (#91474) 2022-11-10 12:59:28 -05:00
Etki cec0ab20ff
Added reference to terms_set query in regular terms query documentation (#91204)
* Added reference to terms_set query in regular terms query documentation

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

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

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-11-09 16:00:52 +01:00
Abdon Pijpelink d0d2c74573
[DOCS] Clarify that lookup runtime sub-fields can't be used in queries and aggs (#91410) 2022-11-08 19:05:31 +01:00
Julie Tibshirani 3948d4b215
Link to kNN search guide in dense_vector docs (#91372)
Before it linked to script_score and approximate kNN separately, but now we have
a single page that describes both approaches. This change also removes a link to
the deprecated _knn_search API.
2022-11-08 07:46:01 -08:00
saryeHaddadi f66f10fe34
Fix confusion in runtime_mapping (#90999) 2022-11-08 14:16:41 +01:00
Craig Taverner c19f642d94
Refine geo-point and geo-shape docs (#90913)
* Refine geo-point and geo-shape docs

While reviewing the docs for another issue, some deprecated
references to prefix-trees were discovered, leading to interest
in bringing the docs a little more up-to-date.

* Update docs/reference/mapping/types/geo-point.asciidoc

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

* Update docs/reference/mapping/types/geo-shape.asciidoc

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

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-10-26 12:21:34 +02:00
Jack Conradson f28ae4b288
Add support for indexing byte-sized knn vectors (#90774)
This change adds an element_type as an optional mapping parameter for dense vector fields as 
described in #89784. This also adds a byte element_type for dense vector fields that supports storing 
dense vectors using only 8-bits per dimension. This is only supported when the mapping parameter 
index is set to true.

The code follows a similar pattern to our NumberFieldMapper where we have an enum for 
ElementType, and it has methods that DenseVectorFieldType and DenseVectorMapper can delegate to 
to support each available type (just float and byte for now).
2022-10-20 14:45:58 -07:00
Nik Everett 82aeb478db
Synthetic `_source`: support `wildcard` field (#90196)
This adds synthetic `_source` support for the `wildcard` field type.
2022-10-12 15:55:13 -04:00
Mark Laney fe2ec6c916 Remove any mention of "mapping type" (#86242)
Mapping types were removed in v6.0 so they shouldn't be mentioned in the
description of inheritance of the `dynamic` setting.
2022-09-27 16:47:11 +02:00
Nik Everett eec7ba4737
Put synthetic source back in tech preview (#90371)
I got some new this morning that we're going to have to rework how we
handle ignore-above in synthetic _source which makes me a bit weary of
removing tech-preview in 8.5. I asked a few folks and they felt more
comfortable giving it a little longer in tech preview. I expect until
ignore-above is in.
2022-09-27 02:15:04 +09:30
Nik Everett d0cf9f5034
Synthetic `_source`: `ignore_malformed` for `ip` (#90038)
This adds synthetic `_source` support for `ip` fields with
`ignore_malfored` set to `true`. We save the field values in hidden
stored field, just like we do for `ignore_above` keyword fields. Then we
load them at load time.
2022-09-26 09:28:55 -04:00
Alan Woodward d507a4982c
Add line to meta param docs explaining limits on use (#90300) 2022-09-23 16:19:28 +01:00
Christoph Büscher 4ae17d2dc6 Docs: Fix small typo in runtime.asciidoc (#90194)
A small grammar fix.
2022-09-22 11:34:27 +02:00
Nik Everett 17967a98d3
Remove synthetic _source from tech preview (#90042)
I've been hacking on synthetic source for a while now and not seen any
need to break backwards compatibility or any major bugs. I think it's
time to remove the `preview` marker from it so folks can use it without
fear.
2022-09-13 16:33:10 -04:00
Alan Woodward 224f48e637
[DOCS] document that date and date_nanos fields support synthetic source (#89968) 2022-09-09 17:21:43 +01:00
Christos Soulios 1a709caa65 [TSDB] Removed `summary` and `histogram` metric types (#89937)
It seems that for now we don't have a good use for the histogram and summary metric types. 
They had been left as place holders for a while, but at this point there is no concrete plan forward for them.

This PR removes the histogram and summary metric types. We may add them back in the future.

Also, this PR completely removes the time_series_metric mapping parameter from the histogram field type and only allows the gauge metric type for aggregate_metric_double fields.
2022-09-09 15:04:30 +03:00
Nik Everett c4a77d572d
Synthetic _source: support dense_vector (#89840)
This adds support for synthetic _source to `dense_vector` fields.

![image](https://user-images.githubusercontent.com/215970/188734496-0f0772c7-4c7a-46b6-b978-0c220e73474d.png)
2022-09-09 00:54:59 +09:30
Nik Everett e89586c20d
Document synthetic source for text and keyword (#89893)
`text` and `keyword` fields support synthetic _source in a few more
configurations now. This documents those configurations.
2022-09-08 23:35:27 +09:30
Nik Everett b667aa33f0
Synthetic _source: support histogram field (#89833)
Adds support for the `histogram` field type to synthetic _source.

![image](https://user-images.githubusercontent.com/215970/188691249-9d23d1dc-64ab-49a4-8b24-f60fc966c0ac.png)
2022-09-08 01:55:38 +09:30
Nik Everett 104f4e9fb5
Synthetic _source: support version field type (#89706)
This adds support for synthetic _source to the `version` field type. It
works very similarly to `keyword` but with an extra decode step.

I modified the decoder to return a `BytesRef` instead of a `String`
because many of the callers seemed to be converting that string directly
into bytes again. Synthetic source would have wanted to do that. As was
the query infrastructure.
2022-08-30 09:39:50 -04:00
Abdon Pijpelink e891909dfa
[DOCS] Explain dynamic behavior for unmapped copy_to fields (#89626)
* [DOCS] Explain dynamic behavior for unmapped copy_to fields

* Review suggestions
2022-08-30 15:15:35 +02:00
David Kilfoyle 2a44a8982f
[DOCS] Remove feature flag from TSDS docs (#89673)
* Docs: Remove feature flag and add preview label to TSDS docs

* Fix technical preview tag
2022-08-29 10:33:55 -04:00
Nik Everett 914e216ebd
Prepare synthetic source docs for tech-preview (#89358)
Now that we're releasing synthetic _source as a tech preview feature, we
no longer want to remove the docs from the non-release builds. And we
want to mark all of the headings describing synthetic `_source` as a
preview.
2022-08-16 10:05:45 -04:00
Nik Everett 2569d1f08d
Docs: synthetic source doesn't dedupe numbers (#89355)
The docs for synthetic `_source` incorrectly claimed that synthetic
`_source` deduplicates numbers. It doesn't. The example below the prose
shows it *not* removing duplicates.
2022-08-16 07:28:46 +09:30
Mayya Sharipova 10b804730d
Include runtime fields in total fields count (#89251)
We have a check that enforces the total number of fields needs to be below a
certain (configurable) threshold. Before runtime fields did not contribute
to the count. This patch makes all runtime fields contribute to the
count, runtime fields:
- that were explicitly defined in mapping by a user
- as well as runtime fields that were dynamically created by dynamic
 mappings

Closes #88265
2022-08-15 09:43:12 -04:00
Luca Belluccini 2d3bcc483d
[DOCS] Warn only one date format is added to the field date formats when using dynamic_date_formats (#88915)
* [DOCS] Warn only one date format is added to the field date formats

When using multiple options in `dynamic_date_formats`, only one of the formats of the first document having a date matching one of the date formats provided will be used.

E.g.
```
PUT my-index-000001
{
  "mappings": {
    "dynamic_date_formats": [ "yyyy/MM", "MM/dd/yyyy"]
  }
}

PUT my-index-000001/_doc/1
{
  "create_date": "09/25/2015"
}
```

The generated mappings will be:
```
    "mappings": {
      "dynamic_date_formats": [
        "yyyy/MM",
        "MM/dd/yyyy"
      ],
      "properties": {
        "create_date": {
          "type": "date",
          "format": "MM/dd/yyyy"
        }
      }
    },
```

Indexing a document with `2015/12` would lead to the `format` `"yyyy/MM"` being used for the `create_date`.

This can be misleading especially if the user is using multiple date formats on the same field.
The first document will determine the format of the `date` field being detected.

Maybe we should provide an additional example, such as:
```
PUT my-index-000001
{
  "mappings": {
    "dynamic_date_formats": [ "yyyy/MM||MM/dd/yyyy"]
  }
}
```

My wording is not great, so feel free to amend/edit.

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

Reword and add code example

* Turned discussion of the two syntaxes into an admonition

* Fix failing tests

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-08-11 10:43:53 +02:00
Abdon Pijpelink b96c39e7ad
[DOCS] Move completion type asciidoc (#89086)
* [DOCS] Move completion type asciidoc

* Fix failing code snippet test
2022-08-04 10:02:28 +02:00
Christos Soulios ad2dc834a7
Add `synthetic_source` support to `aggregate_metric_double` fields (#88909)
This PR implements synthetic_source support to the aggregate_metric_double
field type

Relates to #86603
2022-08-01 20:42:25 +03:00
Gilad Gal c35cfc9fca
Update synthetic-source.asciidoc (#88880)
* Update synthetic-source.asciidoc

* Update docs/reference/mapping/fields/synthetic-source.asciidoc

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

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-07-28 10:35:10 +03:00
Julie Tibshirani e3ede67262
Integrate ANN into _search endpoint (#88694)
This PR adds a new `knn` option to the `_search` API to support ANN search.
It's powered by the same Lucene ANN capabilities as the old `_knn_search`
endpoint. The `knn` option can be combined with other search features like
queries and aggregations.

Addresses #87625
2022-07-22 08:02:07 -07:00