Skip to content

Instantly share code, notes, and snippets.

Igor Motov imotov

Block or report user

Report or block imotov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8ba51253b94296d0ef562a94e12f10cc
Запрос 1:
POST tenders_2019/_doc/_search
{
"_source": false,
"timeout": "3m",
"query": {
"bool": {
"filter": [
{
"bool": {
View issue-34047-repo.txt
DELETE test
PUT test
{
"mappings": {
"doc": {
"properties": {
"shape": {
"ignore_malformed": true,
"type": "geo_shape",
View wildcardsearch.sh
curl -XDELETE 'localhost:9200/test-idx'
curl -XPUT 'localhost:9200/test-idx' -d '{
"mappings": {
"doc": {
"properties": {
"foo" : {
"type": "string",
"index": "not_analyzed"
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am imotov on github.
  • I am imotov (https://keybase.io/imotov) on keybase.
  • I have a public key whose fingerprint is 3AD2 00AD 11F8 0B44 21F1 6D11 9DE3 331B 5426 2EAF

To claim this, I am signing this object:

@imotov
imotov / gist:3973641
Created Oct 29, 2012
Sorting mixed integer/string field
View gist:3973641
curl -XDELETE 'http://localhost:9200/test-idx'
echo
curl -XPUT 'http://localhost:9200/test-idx' -d '
{
"mappings": {
"doc": {
"properties" : {
"mixed" : {"type": "string", "store": "yes"}
}
}
@imotov
imotov / dates.sh
Created Dec 15, 2013
Inconsistent treatment of dates without year
View dates.sh
curl -XDELETE "localhost:9200/test-idx?pretty"
curl -XPUT "localhost:9200/test-idx?pretty" -d '{
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"doc": {
"properties": {
"event_time" : {
View output.json
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 3,
View gist:7495959
$ curl -XPUT localhost:9200/test-idx/doc/1 -d '{"foo": "BaR"}'
{"ok":true,"_index":"test-idx","_type":"doc","_id":"1","_version":1}
$ curl "localhost:9200/test-idx/doc/_search?q=baR&pretty"
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
View regions-ngram.sh
curl -XDELETE localhost:9200/test-idx
curl -XPUT localhost:9200/test-idx -d '{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"region_analyzer": {
"tokenizer": "my_ngram"
View script_sort.sh
curl -XDELETE localhost:9200/test-idx
curl -XPUT localhost:9200/test-idx -d '{
"settings": {
"index": {
"number_of_replicas": 0,
"number_of_shards": 1
}
},
"mappings": {
"doc": {
You can’t perform that action at this time.