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
| { | |
| "took": 14, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 1, | |
| "successful": 1, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 1, |
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 -X PUT \ | |
| http://localhost:9200/suggest_sample_index \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "settings": { | |
| "number_of_shards": 1, | |
| "number_of_replicas": 0, | |
| "analysis": { | |
| "analyzer": { |
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 -X POST \ | |
| http://localhost:9200/suggest_sample_index/_bulk \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{"index":{"_index":"suggest_sample_index", "_type":"sample_type", "_id" : 1}} | |
| { "title":"Fransız Basın Ajansı prestij ödüllerini dağıttı", "title_autocomplete":"Fransız Basın Ajansı prestij ödüllerini dağıttı" } | |
| {"index":{"_index":"suggest_sample_index", "_type":"sample_type", "_id" : 2}} | |
| { "title":"Doktorlara kamu görevi zorunluluğu kalkıyor","title_autocomplete":"Doktorlara kamu görevi zorunluluğu kalkıyor"} | |
| {"index":{"_index":"suggest_sample_index", "_type":"sample_type", "_id" : 3}} | |
| { "title":"Doksanların müzikleri raflardaki yerini alıyor","title_autocomplete":"Doksanların müzikleri raflardaki yerini alıyor"} |
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 -X POST \ | |
| http://localhost:9200/suggest_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "suggest": { | |
| "title-suggest" : { | |
| "prefix" : "do", | |
| "completion" : { | |
| "field" : "title_autocomplete" |
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
| { | |
| "took": 1, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 1, | |
| "successful": 1, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 0, |
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 -X POST \ | |
| http://localhost:9200/suggest_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "_source" : "title_autocomplete", | |
| "suggest": { | |
| "title-suggest" : { | |
| "prefix" : "do", | |
| "completion" : { |
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 -X POST \ | |
| http://localhost:9200/suggest_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "_source" : "title_autocomplete", | |
| "suggest": { | |
| "title-suggest" : { | |
| "prefix" : "dög", | |
| "completion" : { |
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 -X POST \ | |
| http://localhost:9200/suggest_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "_source" : "title_autocomplete", | |
| "suggest": { | |
| "title-suggest" : { | |
| "regex" : "s[u|ü]rat", | |
| "completion" : { |
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
| { | |
| "took": 1, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 1, | |
| "successful": 1, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 0, |
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
| server { | |
| set $new_cookie $http_cookie; | |
| if ($http_cookie ~ "(.*)(?:^|;)\s*non_ascii=[^;]+(.*)") { | |
| set $new_cookie $1$2; | |
| } | |
| proxy_set_header Cookie $new_cookie; | |
| listen 8080; | |
| server_name localhost; |