Last active
December 14, 2015 04:58
-
-
Save dadoonet/5031671 to your computer and use it in GitHub Desktop.
NPE when doing fuzzy (tested on empty and filed index)
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 -XDELETE http://localhost:9200/npefuzzy | |
curl -XPUT http://localhost:9200/npefuzzy?pretty -d '{ | |
"settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }} | |
}' | |
curl -XPUT http://localhost:9200/npefuzzy/beer/1?pretty -d '{ | |
"brand":"Grimbergen", | |
"colour":"PALE", | |
"size":1.3476184461445255, | |
"price":7.318647685097387, | |
"date":1320090719440 | |
}' | |
curl -XPOST "localhost:9200/npefuzzy/_refresh?pretty" | |
# This one is OK | |
curl -XPOST http://localhost:9200/npefuzzy/beer/_search?pretty -d ' | |
{"query":{ | |
"flt" : { | |
"fields" : [ "brand", "colour" ], | |
"like_text" : "heineken is a pale beer", | |
"max_query_terms" : 12 | |
} | |
}}' | |
# This one was ok (no error) in 0.20 (Lucene 3) but fails with 0.21 (Lucene 4) | |
curl -XPOST http://localhost:9200/npefuzzy/beer/_search?pretty -d ' | |
{"query":{ | |
"flt" : { | |
"fields" : [ "brand", "nonexistingfield" ], | |
"like_text" : "heineken is a pale beer", | |
"max_query_terms" : 12 | |
} | |
}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment