Created
February 15, 2012 18:54
Revisions
-
mattweber created this gist
Feb 15, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ index: analysis: analyzer: string_lowercase: tokenizer: keyword filter: 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # does not work curl -XGET 'http://localhost:9200/test/type1/_search?pretty=true' -d '{ "query":{ "field":{ "field1":{ "query":"matt weber" } } } }' # does not work curl -XGET 'http://localhost:9200/test/type1/_search?pretty=true' -d '{ "query":{ "field":{ "field1":{ "query":"matt weber", "analyzer":"string_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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ curl -XPUT 'http://localhost:9200/test' -d '{ "mappings" : { "type1" : { "properties" : { "field1" : { "type" : "string", "analyzer" : "string_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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # does not work curl -XGET 'http://localhost:9200/test/type1/_search?pretty=true' -d '{ "query":{ "query_string":{ "query":"matt weber", "fields":["field1"] } } }' # does not work curl -XGET 'http://localhost:9200/test/type1/_search?pretty=true' -d '{ "query":{ "query_string":{ "query":"matt weber", "fields":["field1"], "analyzer":"string_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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ curl -XPUT 'http://localhost:9200/test/type1/1' -d '{"field1":"Matt Weber"}' 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # works with and without specifying the analyzer curl -XGET 'http://localhost:9200/test/type1/_search?pretty=true' -d '{ "query":{ "text":{ "field1":{ "query":"matt weber" } } } }'