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
Fri Jun 30 13:54:48 UTC 2017 |
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/bash | |
ES='http://localhost:9200' | |
ESIDX='test3' | |
ESTYPE='test' | |
curl -XDELETE $ES/$ESIDX | |
curl -XPUT $ES/$ESIDX/ -d '{ | |
"settings" : { |
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
# Inserting a pckg | |
curl -X POST localhost:9200/pckgs/pckg/1 -d '{ | |
"pckg" : { | |
"title" : "Rio de Janeiro", | |
"shuttleService": "NOTINC", | |
"published" : "true", | |
} | |
}' |
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
# Delete the index | |
curl -XDELETE localhost:9200/facettests/facettest/ | |
# create it | |
curl -XPUT localhost:9200/facettests/ | |
# set mapping (multi field for facets) | |
# NOTE THAT THIS HAS KEYWORD ANALYZER OVER NAME, and not nameFacet | |
# this DOES work |
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
# Delete the index | |
curl -XDELETE localhost:9200/facettests/ | |
# create it | |
curl -XPUT localhost:9200/facettests/ | |
# set mapping (multi field for facets) | |
curl -XPUT localhost:9200/facettests/facettest/_mapping -d '{ | |
"facettest" : { | |
"properties" : { |
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
# Delete previous just in case | |
curl -XDELETE localhost:9200/facettests/facettest/ | |
# Set the mapping for out facet | |
curl -XPUT localhost:9200/facettests/facettest/_mapping -d '{ | |
"facettest" : { | |
"properties" : { | |
"employmentHistory" : { | |
"properties" : { | |
"name" : { |
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
# Inserting a pin | |
curl -X POST "http://localhost:9200/pins/pin/1" -d '{ | |
"pin" : { | |
"location" : { | |
"lat" : 40.12, | |
"lon" : -71.34 | |
}, | |
"tag" : ["food", "family"], | |
"text" : "my favorite family restaurant" | |
} |