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
| { | |
| "template": { | |
| "query": { | |
| "match": { | |
| "title": "{{query_string}}" | |
| } | |
| } | |
| } | |
| } |
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/_search/template/basic_search_template \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "template": { | |
| "query": { | |
| "match": { | |
| "title": "{{query_string}}" | |
| } |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| namespace netcore_elastic_search_template | |
| { |
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/career_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/career_sample_index/_bulk \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{"index":{"_index":"career_sample_index", "_type":"sample_type", "_id" : 1}} | |
| { "CompanyName" : "ABC Softwarehouse", "Position":"Software Developer", "Salary" : 5000, "Servicing" : true, "Location" : "41.165493, 28.532379"} | |
| {"index":{"_index":"career_sample_index", "_type":"sample_type", "_id" : 2}} | |
| { "CompanyName" : "DEF Tech", "Position":"Software Developer", "Salary" : 5500, "Servicing" : false, "Location" : "41.153168, 28.544824"} | |
| {"index":{"_index":"career_sample_index", "_type":"sample_type", "_id" : 3}} | |
| { "CompanyName" : "ASD Cloud Solutions", "Position":"Software Developer", "Salary" : 5250, "Servicing" : true, "Location" : "41.158358, 28.512380"} |
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/career_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "query": { | |
| "function_score": { | |
| "functions": [ | |
| { | |
| "gauss": { |
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/career_sample_index/_search \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "query": { | |
| "function_score": { | |
| "query": { | |
| "match_phrase": { | |
| "Position": "Software Developer" |
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": 231, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 1, | |
| "successful": 1, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 3, |
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": 6, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 1, | |
| "successful": 1, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 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
| docker run -it --name teamcity-docker \ | |
| -v C:\teamcity-docker\data:/data/teamcity_server/datadir \ | |
| -v C:\teamcity-docker\logs:/opt/teamcity/logs \ | |
| -p 8111:8111 \ | |
| jetbrains/teamcity-server:latest |