-
-
Save aherlambang/027dd7316a999cb9a1ff to your computer and use it in GitHub Desktop.
elastic search custom analyzer for partial search not working
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 -XGET 'http://localhost:9200/website/_settings' | |
{ | |
"website":{ | |
"settings":{ | |
"index.analysis.filter.shop_name.min_gram":"3", | |
"index.analysis.filter.shop_name.max_gram":"20", | |
"index.analysis.tokenizer.name_tokenizer.max_gram":"10", | |
"index.analysis.analyzer.name_analyzer.tokenizer":"name_tokenizer", | |
"index.analysis.tokenizer.name_tokenizer.min_gram":"1", | |
"index.analysis.filter.shop_name.type":"edgeNGram", | |
"index.analysis.tokenizer.name_tokenizer.type":"edgeNGram", | |
"index.number_of_shards":"5", | |
"index.number_of_replicas":"1", | |
"index.version.created":"900699", | |
"index.uuid":"4HoRw4dKT7yl2-jo6UsZjQ" | |
} | |
} | |
} | |
{ | |
"website":{ | |
"shop":{ | |
"properties":{ | |
"bio":{ | |
"type":"string", | |
"boost":4.0, | |
"include_in_all":true | |
}, | |
"fullname":{ | |
"type":"string", | |
"boost":3.0, | |
"analyzer":"name_analyzer", | |
"include_in_all":true | |
}, | |
"userPictures":{ | |
"type":"nested", | |
"include_in_all":true, | |
"properties":{ | |
"caption":{ | |
"type":"string", | |
"boost":6.0, | |
"include_in_all":true | |
} | |
} | |
}, | |
"username":{ | |
"type":"string", | |
"boost":2.0, | |
"analyzer":"name_analyzer", | |
"include_in_all":true | |
} | |
} | |
} | |
} | |
} | |
curl -XGET 'http://localhost:9200/website/shop/1666' | |
{ | |
"_index":"website", | |
"_type":"shop", | |
"_id":"1666", | |
"_version":1, | |
"exists":true, | |
"_source":{ | |
"username":"moonlyshop", | |
"fullname":"Moonlyshop", | |
"bio":"Phone :081298823655\nLine:sesilia_corneliaa\n?Pin bb :761601a6 (serious buyer)\nTwitter: moonlyshopp \nHit n Run =BLACKLIST\nNo bargain\nBca only", | |
"userPictures":[ | |
{ | |
"caption":"New at twitter Yang jadi 30 followers pertama dpt DISKON order di sni :) chat aja yg ud follow n mau order :) Silahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6\n" | |
}, | |
{ | |
"caption":"Jegging zara n hermes\nJumat READY\nSale!! Idr 98k \nSilahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6 " | |
}, | |
{ | |
"caption":"New at twitter Yang jadi 30 followers pertama dpt DISKON order di sni :) chat aja yg ud follow n mau order :) Silahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6\n" | |
}, | |
{ | |
"caption":"IDR 85.000\nSilahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6 " | |
}, | |
{ | |
"caption":"IDR 85.000\nSilahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6 " | |
}, | |
{ | |
"caption":"IDR 85.000\nSilahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6 " | |
}, | |
{ | |
"caption":"IDR 85.000\nSilahkan order by ?Teks only : 081298823655\n?Line: sesilia_corneliaa\n?Pin bb : 761601a6 " | |
} | |
] | |
} | |
} | |
curl -XGET 'http://localhost:9200/website/_search?q=moonl' | |
{ | |
"took":1, | |
"timed_out":false, | |
"_shards":{ | |
"total":5, | |
"successful":5, | |
"failed":0 | |
}, | |
"hits":{ | |
"total":0, | |
"max_score":null, | |
"hits":[ | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment