This file contains 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
#!/bin/sh | |
curl -X DELETE 'localhost:9200/i/' | |
curl -X POST 'localhost:9200/i/' -d '{ | |
"settings" : { | |
"analysis" : { | |
"analyzer" : { | |
"crazy" : { | |
"type" : "custom", |
This file contains 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
#!/bin/sh | |
curl -X DELETE 'localhost:9200/i/' | |
curl -X POST 'localhost:9200/i/' -d '{ | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
"analysis" : { | |
"analyzer" : { |
This file contains 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
#!/bin/sh | |
curl -X DELETE 'localhost:9200/i/' | |
curl -X POST 'localhost:9200/i/' -d '{ | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
"analysis" : { | |
"analyzer" : { |
This file contains 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
curl -X DELETE 'localhost:9200/i/' | |
curl -X POST 'localhost:9200/i/' -d '{ | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
"analysis" : { | |
"analyzer" : { | |
"content" : { | |
"type" : "custom", |
This file contains 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
Settings settings = settingsBuilder() | |
.put("gateway.type", "local") | |
.put("index.number_of_shards", 1) | |
.put("index.compound_format", true) // ##### Here ? | |
.build(); | |
Node node = NodeBuilder.nodeBuilder() | |
.settings(settings) | |
.local(true) | |
.node(); |
This file contains 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
Settings settings = settingsBuilder() | |
.put("gateway.type", "local") | |
.put("index.number_of_shards", 1) | |
.put("index.compound_format", true) // ##### Here ? | |
.build(); | |
Node node = NodeBuilder.nodeBuilder() | |
.settings(settings) | |
.local(true) | |
.node(); |
This file contains 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
// create an index with an analyzer "myindex" | |
curl -X PUT localhost:9200/myindex -d ' | |
{ | |
"settings" : {` | |
"index":{ | |
"number_of_replicas":0, | |
"number_of_shards":1, | |
"analysis":{ | |
"analyzer":{ | |
"first":{ |
This file contains 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
curl -X PUT localhost:9200/myindex -d ' | |
{ | |
"settings" : { | |
"index":{ | |
"number_of_replicas":0, | |
"number_of_shards":1, | |
"analysis":{ | |
"analyzer":{ | |
"default":{ | |
"type":"custom", |
This file contains 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
org.elasticsearch.search.fetch.FetchPhaseExecutionException: [myindex][0]: query[filtered(code.code.ngram:sam code.code.ngram:xy)->cache(_type:product)],from[0],size[10]: Fetch Failed [Failed to highlight field [code.ngram]] | |
at org.elasticsearch.search.highlight.HighlightPhase.hitExecute(HighlightPhase.java:335) | |
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:250) | |
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:326) | |
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:243) | |
at org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:75) | |
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205) | |
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192) |
This file contains 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
#!/bin/sh | |
curl -XPUT localhost:9200/index_1 -d' | |
{ | |
settings: { | |
number_of_shards: 1, | |
number_of_replicas: 0 | |
}, | |
mappings: { | |
_default_ : { |