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
curl -XDELETE localhost:9200/test | |
curl -XPUT localhost:9200/test -d '{ | |
"settings": { | |
"index.number_of_shards": 1, | |
"index.number_of_replicas": 0 | |
}, | |
"mappings": { | |
"car": { | |
"properties": { | |
"creators" : { |
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
Query inicial | |
------------------------- | |
POST _search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"term": { |
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
PUT indice_teste | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"pt_analyzer": { | |
"type": "custom", | |
"filter": [ | |
"stop_noise", | |
"lowercase" |
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
curl -XPUT localhost:9200/index1/type/1 -d '{ | |
"title": "alice dance" | |
}' | |
curl -XPUT localhost:9200/index1/type/2 -d '{ | |
"title": "alice jump" | |
}' | |
curl -XPUT localhost:9200/index1/type/3 -d '{ | |
"title": "alice run" |
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
http://localhost:9200/_view/index_test/type_test/1 | |
{ | |
"error": "RemoteTransportException[[localhost][inet[/10.11.32.11:9300]][view/s]]; nested: NullPointerException; ", | |
"status": 500 | |
} | |
[2014-02-13 17:27:19,402][DEBUG][action.view ] [localhost] [index_test][0]: failed to execute [org.elasticsearch.action.view.ViewRequest@401b8cc4] | |
org.elasticsearch.transport.RemoteTransportException: [localhost][inet[/10.11.32.11:9300]][view/s] | |
Caused by: java.lang.NullPointerException |
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
# Aqui estou postando o mapping para todos os tipo do índice twitter | |
$ curl -XPUT 'http://localhost:1980/twitter/_mapping' -d ' | |
{ | |
"tweet" : { | |
"properties" : { | |
"message" : {"type" : "string", "store" : "yes"} | |
} | |
} | |
} | |
' |
NewerOlder