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 characters
curl -XGET 'localhost:9200/booksindex/booksidx/_search?pretty=true' -d '{ | |
"query": { | |
"query_string": { | |
"query": "mastering by marek", | |
"fields": [ | |
"title.title_shingles^2", | |
"author.author_shingles" | |
] | |
} | |
} |
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 characters
curl -XGET 'localhost:9200/booksindex/booksidx/_search?pretty=true' -d '{ | |
"query": { | |
"match": { | |
"title" : "elasticsearch" | |
} | |
} | |
}' | |
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 characters
{ | |
"_id": ObjectId("53c2890368103fc09aa86632"), | |
"title": "ElasticSearch The Definitve Guide", | |
"isbn": "9781449358549", | |
"author": "Clinton Gormley", | |
"category": "Technology", | |
"rating": 4 | |
} | |
{ |
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 characters
curl -XPUT 'http://localhost:9200/booksindex' -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 1, | |
"analysis" : { | |
"analyzer" : { | |
"str_search_analyzer_1" : { | |
"tokenizer" : "keyword", | |
"filter" : ["lowercase","asciifolding"] |