Questions tagged [elasticsearch-mapping]

For questions about mapping in Elasticsearch; the process of defining how a document should be mapped to the index.

In , an index may store documents of different "mapping types". allows one to associate multiple mapping definitions for each mapping type.

Explicit mapping is defined on an index/type level. By default, there isn’t a need to define an explicit mapping, since one is automatically created and registered when a new type or new field is introduced (with no performance overhead) and have sensible defaults. Only when the defaults need to be overridden must a mapping definition be provided.

186 questions
128
votes
1 answer

No handler for type [string] declared on field [name]

When type is declared as string, Elasticsearch 6.0 will show this error. "name" => [ "type" => "string", "analyzer" => "ik_max_word" ]
Vidy Videni
  • 1,897
  • 3
  • 15
  • 23
38
votes
2 answers

How to Do a Mapping of Array of Strings in Elasticsearch

I can't find any examples of how to structure an array of strings in elasticsearch when trying to PUT a mapping to an index. What I have for the field mapping: :tags {:type :array :store true} The error i get: {:type "mapper_parsing_exception", …
Micah
  • 10,295
  • 13
  • 66
  • 95
37
votes
4 answers

Change default mapping of string to "not analyzed" in Elasticsearch

In my system, the insertion of data is always done through csv files via logstash. I never pre-define the mapping. But whenever I input a string it is always taken to be analyzed, as a result an entry like hello I am Sinha is split into…
26
votes
1 answer

Store Date Format in elasticsearch

I met a problem when I want to add one datetime string into Elasticsearch. The document is below: {"LastUpdate" : "2013/07/24 00:00:00"} This document raised an error which is "NumberFormatException" [For input string: \"20130724 00:00:00\"] I know…
Jimmy Lin
  • 1,481
  • 6
  • 27
  • 44
13
votes
1 answer

Elasticsearch object mapping for tried to parse field [null] as object, but found a concrete value

How can I change mapping or my input to resolve these error, using elasticsearch on AWS, Mapping: { "index_patterns": ["*-students-log"], "mappings": { "properties": { "Data": { …
13
votes
4 answers

Elasticsearch Mapping - Rename existing field

Is there anyway I can rename an element in an existing elasticsearch mapping without having to add a new element ? If so whats the best way to do it in order to avoid breaking the existing mapping? e.g. from fieldCamelcase to fieldCamelCase { …
e.f.a.
  • 323
  • 1
  • 4
  • 12
12
votes
2 answers

Elasticsearch mapping - different data types in same field

I am trying to to create a mapping that will allow me to have a document looking like this: { "created_at" : "2014-11-13T07:51:17+0000", "updated_at" : "2014-11-14T12:31:17+0000", "account_id" : 42, "attributes" : [ { …
Morten Hauberg
  • 531
  • 1
  • 5
  • 12
11
votes
2 answers

Edge NGram with phrase matching

I need to autocomplete phrases. For example, when I search "dementia in alz", I want to get "dementia in alzheimer's". For this, I configured Edge NGram tokenizer. I tried both edge_ngram_analyzer and standard as the analyzer in the query body.…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
11
votes
5 answers

Creating an index Nest

How would I recreate the following index using Elasticsearch Nest API? Here is the json for the index including the mapping: { "settings": { "analysis": { "filter": { "trigrams_filter": { …
10
votes
1 answer

Pypsark - Retain null values when using collect_list

According to the accepted answer in pyspark collect_set or collect_list with groupby, when you do a collect_list on a certain column, the null values in this column are removed. I have checked and this is true. But in my case, I need to keep the…
9
votes
2 answers

Elasticsearch version 7 cannot be changed from type [keyword] to [text]

I am a newbie of elasticsearch. I create a mapping using such code: PUT /my-demo1 { "mappings": { "properties": { "dsu_sn": { "type": "keyword" }, "iot_id": { "type": "keyword" }, "test_suite_id":…
Vin Qin
  • 129
  • 1
  • 1
  • 8
9
votes
3 answers

Searching subtitle data in elasticsearch

Having the following data (simple srt) 1 00:02:17,440 --> 00:02:20,375 Senator, we're making our final 2 00:02:20,476 --> 00:02:22,501 approach into Coruscant. ... what would be the best way to index it in Elasticsearch? Now here's the catch: I…
9
votes
2 answers

Elasticsearch _timestamp

I tried to define the _timestamp property on an index. So first, I create the index curl -XPUT 'http://elasticsearch:9200/ppe/' response from the server : {"ok":true,"acknowledged":true} then I tried to define the mapping with a _timestamp curl…
Xavier
  • 173
  • 2
  • 7
6
votes
3 answers

How to store relational data in elasticsearch

What are the options to store relational data in elasticsearch. I know the following approaches Nested object :- I don't want to store data in nested format because I want to update the one document without changing the other document and if I use…
mkalsi
  • 355
  • 1
  • 3
  • 14
5
votes
0 answers

Full dotted path (any level path) with path_match in dynamic_templates

I have this document { "text_foo": "lorem ipsum", "one":{ "two":{ "three":{ "text_bar": "dolor sit amet" } } } } What i'm trying to acomplish: I need dynamic template, that will…
1
2 3
12 13