Created
October 7, 2011 15:20
-
-
Save imotov/1270503 to your computer and use it in GitHub Desktop.
Elasticsearch NPE during highlighting
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 | |
# | |
# Start 2 ES nodes with default settings before running this script | |
# | |
curl -XDELETE http://localhost:9200/testidx | |
curl -XPUT http://localhost:9200/testidx -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} | |
}, | |
"mappings" : { | |
"rec" : { | |
"_source" : { "enabled" : false }, | |
"properties" : { | |
"from" : { "type": "string", "store": "yes" } | |
} | |
} | |
} | |
}' | |
curl -XPUT http://localhost:9200/testidx/rec/1 -d '{ | |
"from" : ["user3@test.com","user2@test.com","user5@test.com"] | |
}' | |
echo | |
curl -XPOST http://localhost:9200/testidx/_refresh | |
echo | |
curl localhost:9200/testidx/_search -d '{ | |
"highlight": { | |
"fields":{"from":{"number_of_fragments":0}} | |
}, | |
"fields":["*"], | |
"size":10, | |
"sort":["_score"], | |
"query":{ | |
"query_string":{ | |
"default_field":"from", | |
"query":"*:*" | |
} | |
} | |
}' && echo | |
curl localhost:9201/testidx/_search -d '{ | |
"highlight": { | |
"fields":{"from":{"number_of_fragments":0}} | |
}, | |
"fields":["*"], | |
"size":10, | |
"sort":["_score"], | |
"query":{ | |
"query_string":{ | |
"default_field":"from", | |
"query":"*:*" | |
} | |
} | |
}' && echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment