Skip to content

Instantly share code, notes, and snippets.

View imotov's full-sized avatar

Igor Motov imotov

View GitHub Profile
curl -XDELETE localhost:9200/test-idx
echo
curl -XPUT localhost:9200/test-idx -d '{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"query_default": {
curl -XDELETE localhost:9200/test-idx
curl -XPUT localhost:9200/test-idx -d '{
"settings" :{
"index": {
"number_of_shards": 1,
"number_of_replicas": 0
}
},
"mappings": {
"doc": {
curl -XDELETE 'http://localhost:9200/test-idx'
echo
curl -XPUT 'http://localhost:9200/test-idx' -d '{
"mappings": {
"article": {
"properties": {
"a": {
"type": "integer"
},
"b": {
curl -XPUT 'http://localhost:9200/test50k' -d '{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": "standard, lowercase, hunspell_hr"
}
},
curl -XDELETE 'localhost:9200/test-idx'
curl -XPUT 'localhost:9200/test-idx' -d '{
"mappings": {
"doc": {
"properties": {
"foo" : {
"type": "string",
"index": "not_analyzed"
}
}
curl -XDELETE http://localhost:9200/test-idx
echo
curl -XPUT http://localhost:9200/test-idx -d '{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
},
"mappings" : {
curl -XDELETE 'http://localhost:9200/test-idx'
echo
curl -XPUT 'http://localhost:9200/test-idx' -d '
{
"mappings": {
"doc": {
"properties" : {
"checkByte": {"type": "byte", "store": "yes" }
}
}
@imotov
imotov / porter_vs_2.sh
Created November 29, 2012 01:03
Porter vs Porter2
curl -XDELETE localhost:9200/test-idx
curl -XPUT localhost:9200/test-idx -d '{
"index": {
"analysis": {
"analyzer": {
"porter1": {
"tokenizer": "standard",
"filter": ["lowercase", "porter1"]
},
"porter2": {
curl -XDELETE localhost:9200/test-idx
echo
curl -XPUT localhost:9200/test-idx -d '{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0
}
},
"mappings": {
curl -XDELETE 'http://localhost:9200/test-idx'
echo
curl -XPUT 'http://localhost:9200/test-idx' -d '
{
"settings": {
"index.number_of_shards" : 1
},
"mappings": {
"doc": {
"properties" : {