This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######### | |
| # 2018-11-21 | |
| # | |
| ######## | |
| # Ver si en los metadatos de los mappings se pueden definir objetos, mappings. | |
| PUT test_object_in_meta/_doc/1 | |
| { | |
| "_meta": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example: for example i have a person with nested- adresses. and query name of person with city and zip of the adress in one query? | |
| PUT clients/_doc/1 | |
| { | |
| "client": "dp", | |
| "address": { | |
| "city": "north", | |
| "zip": "1234" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # start with a clean install | |
| DELETE test_index | |
| DELETE _template/my_global_template | |
| #create an index | |
| PUT test_index | |
| GET test_index/_settings | |
| # if ES < 7.0 this will have 5 primary shards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # looking into TERMS aggs vs index false | |
| # start clean | |
| DELETE test | |
| # define an index with two fields, with index | |
| # set to true & false | |
| PUT test | |
| { | |
| "mappings": { | |
| "_doc": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### Simulate scenario by indexing some example docs to local Elasticsearch | |
| POST index-2018-08-09/logs_2 | |
| { | |
| "datetime_log": "2018-08-09T00:34:36.051+02:00", | |
| "datetime_receive": "2018-08-09T00:34:36.051+02:00", | |
| "group": "DEFAUT", | |
| "ip_host": "22.33.44.55", | |
| "ip_host_pkt": "22.33.44.55", | |
| "source_msg": "22.33.44.55: -Trashback= XXXXXXXXX XXXXXXXXXX XXXXXXXXX 8002DAD8 YYYYYYYY ZZZZZZZZZ UUUUUUUU IIIIIIIIII", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add a test document to the index | |
| PUT index-2018-08-09/logs_2/AWUbrXRdjZ-987654akh | |
| { | |
| "datetime_log": "2018-08-09T00:34:36.051+02:00", | |
| "datetime_receive": "2018-08-09T00:34:36.051+02:00", | |
| "group": "DEFAUT", | |
| "ip_host": "22.33.44.55", | |
| "ip_host_pkt": "22.33.44.55", | |
| "source_msg": "22.33.44.55: -Trashback= XXXXXXXXX XXXXXXXXXX XXXXXXXXX 8002DAD8 YYYYYYYY ZZZZZZZZZ UUUUUUUU IIIIIIIIII", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # translog size | |
| http://0.0.0.0:9200/_all/_stats?filter_path=_all.primaries.translog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cluster settings | |
| http://0.0.0.0:9200/_cluster/settings?pretty=true&include_defaults=true | |
| # index settings | |
| http://0.0.0.0:9200/_all/_settings | |
| # nodes settings | |
| http://0.0.0.0:9200/_nodes/_all?pretty=true | |
| # nodes os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE my_* | |
| PUT _template/template_1 | |
| { | |
| "index_patterns": ["*"], | |
| "order": 1, | |
| "settings": { | |
| "number_of_shards": 1, | |
| "number_of_replicas": 0 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # take a look at the difference between these 2 examples, you can cut and paste them into Kibana | |
| # Standard Dutch | |
| POST _analyze | |
| { | |
| "tokenizer": "standard", | |
| "filter": [ | |
| "standard", | |
| "lowercase", | |
| { | |
| "type": "stemmer", |