View sample.json
PUT join_highlight | |
{ | |
"mappings": { | |
"properties": { | |
"my_id": { | |
"type": "keyword" | |
}, | |
"my_join_field": { | |
"type": "join", | |
"relations": { |
View demo.json
## version 7.9で動作するはずです。 discard_compound_tokenの設定は7.8までは動作しないです(それ以外については動作します。) | |
DELETE en_synonym_test | |
PUT en_synonym_test | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"en_synonym": { |
View words.txt
start with punctuation: [606]. one char is [384] | |
all punctuations: [111] | |
hasPunctuations: [1780] | |
+++++++++++++++++ Start with Punctuation +++++++++++++++++++++ | |
¡ | |
¢ | |
£ | |
¤ | |
¦ | |
§ |
View gist:50aa2776a385c5c8dfa3a0d1e4e268cd
start with punctuation: [101]. one char is [97] | |
all punctuations: [3] | |
hasPunctuations: [723] | |
+++++++++++++++++ Start with Punctuation +++++++++++++++++++++ | |
」 | |
— | |
← | |
゜ | |
▽ | |
` |
View 1_辞書の更新方法_ファイル編.json
## 0. インデックスの準備 | |
### 再現可能なようにまず削除 | |
DELETE file_dic_sample | |
### 辞書ファイルの用意 | |
ファイル名 : custom_dic.txt | |
配置場所 : ES_PATH_CONF/analyzer/custom_dic.txt | |
内容 | |
``` |
View .zshrc
## For rewrite prezto default settings | |
EDITOR=vim | |
VISUAL=vim | |
### aliases | |
alias ls='ls -aG' | |
alias vscode='open -a ~/Applications/Visual\ Studio\ Code.app ' | |
### For ant | |
export ANT_OPTS=-Dfile.encoding=UTF-8 |
View build.xml
<?xml version="1.0"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
View gist:b53e9e241e5b98519fb3ffe12b4164eb
~/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji (fix-4056 *$) $ ant clean | |
Buildfile: /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji/build.xml | |
clean: | |
[delete] Deleting directory /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/build/analysis/kuromoji | |
BUILD SUCCESSFUL | |
Total time: 0 seconds | |
~/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji (fix-4056 *$) $ ant build-dict | |
Buildfile: /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji/build.xml |
View gist:310672675aec7d2a9ed8516bf0ae3558
PUT _template/hoge | |
{ | |
"index_patterns": ["hoge-*"], | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 2 | |
}, | |
"mappings": { | |
"type1": { |
View apachelog reindex for demo on target date
POST _reindex | |
{ | |
"source": { | |
"index": "apache_elk_example_org" | |
}, | |
"dest": { | |
"index": "apache_elk_example" | |
}, | |
"script": { | |
"inline": "Random rdm = new Random();ctx._source['@timestamp'] = params.dates[rdm.nextInt(params.dates.length)]+ ctx._source['@timestamp'].substring(10);", |
NewerOlder