Skip to content

Instantly share code, notes, and snippets.

View imotov's full-sized avatar

Igor Motov imotov

View GitHub Profile
DELETE test
DELETE test-reindexed
PUT test
{
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"_doc": {
DELETE test
PUT test
{
"mappings": {
"doc": {
"properties": {
"shape": {
"ignore_malformed": true,
"type": "geo_shape",
curl -XDELETE localhost:9200/test
curl -XPUT localhost:9200/test -d '{
"settings": {
"index.number_of_shards": 1,
"index.number_of_replicas": 0
}
}
'
curl -XPOST localhost:9200/test/doc/1 -d '{
"dna":[
Запрос 1:
POST tenders_2019/_doc/_search
{
"_source": false,
"timeout": "3m",
"query": {
"bool": {
"filter": [
{
"bool": {
curl -XDELETE 'localhost:9200/test-idx'
curl -XPUT 'localhost:9200/test-idx' -d '{
"mappings": {
"doc": {
"properties": {
"foo" : {
"type": "string",
"index": "not_analyzed"
}
}

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 October 29, 2012 13:46
Sorting mixed integer/string field
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 December 15, 2013 21:12
Inconsistent treatment of dates without year
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" : {
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 3,
$ 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,