Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diloabininyeri/6607b49fa8a454789f27e25f3d557bfb to your computer and use it in GitHub Desktop.
Save diloabininyeri/6607b49fa8a454789f27e25f3d557bfb to your computer and use it in GitHub Desktop.
ı searching kadir but ı writin kader and that is have misspeling in my word, even elasticsearch find kadir
request
POST http://localhost:9200/personels/musteri/_search
Content-Type: application/json
{
"query": {
"multi_match": {
"query": "kader",
"fuzziness": "AUTO"
}
}
}
###
reponse
POST http://localhost:9200/personels/musteri/_search
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
{
"took": 8,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 9,
"max_score": 1.1090355,
"hits": [
{
"_index": "personels",
"_type": "musteri",
"_id": "Stw3UGcBilh1i2DctdHL",
"_score": 1.1090355,
"_source": {
"isim": "arzu",
"soyad": "kadir"
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "TNx7UGcBilh1i2DcGNHQ",
"_score": 0.5889361,
"_source": {
"isim": "arzu",
"soyad": "kadir ve sevgi",
"tags": [
"man",
"woman",
"male",
"female"
]
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "S9w3UGcBilh1i2Dc4dFc",
"_score": 0.5814434,
"_source": {
"isim": "arzu",
"soyad": "kadir ve sevgi"
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "Sdw2UGcBilh1i2Dc-tHn",
"_score": 0.55451775,
"_source": {
"isim": "kadir",
"soyad": "urfa lı bir adam"
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "TtyoUGcBilh1i2DcAdFG",
"_score": 0.23014566,
"_source": {
"test_suggests": {
"isim": "doktor",
"soyad": "kadir ve sevgi",
"tags": [
"man",
"woman",
"male",
"female"
]
}
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "SNw2UGcBilh1i2DcxtG6",
"_score": 0.23014566,
"_source": {
"name": "kadir",
"soyad": "urfa lı bir adam"
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "R9w2UGcBilh1i2DcbNER",
"_score": 0.23014566,
"_source": {
"name": "kadir",
"soyad": "urfa lı bir adam"
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "Tdx8UGcBilh1i2Dc8NFd",
"_score": 0.14585726,
"_source": {
"test_suggests": {
"isim": "arzu",
"soyad": "kadir ve sevgi",
"tags": [
"man",
"woman",
"male",
"female"
]
}
}
},
{
"_index": "personels",
"_type": "musteri",
"_id": "WkSJVGcBc7iqc17lyJMN",
"_score": 0.14585726,
"_source": {
"test_suggests": {
"isim": "doktor or deniz",
"soyad": "kadir ve sevgi",
"tags": [
"man",
"woman",
"male",
"female"
]
}
}
}
]
}
}
Response code: 200 (OK); Time: 59ms; Content length: 1815 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment