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 gist:5554678
curl -XDELETE 'http://localhost:9200/app'
curl -XPUT 'http://localhost:9200/app' -d '
{
"settings": {
"index.number_of_shards": 1,
"index.number_of_replicas": 0
},
"mappings" : {
"parent": {
"properties" : {
View ElasticSearch Highlighting
curl -XDELETE "http://localhost:9200/test/"
curl -XPUT "http://localhost:9200/test/" -d '{
"mappings": {
"product": {
"properties": {
"doc": {
"properties": {
"name": {
"type": "string",
"include_in_all": true
View add_doc.sh
curl -XPOST http://localhost:9200/test/thing/1 -d '{
"something": "/hello/world"
}'
@imotov
imotov / has-child-on-contact.sh
Created Sep 25, 2012 — forked from andreasch/has-child-on-contact.sh
Querying a parent type that is also a child type for another type
View has-child-on-contact.sh
#!/bin/bash
echo "Performing a has_child search on contacts"
curl -XGET 'http://localhost:9200/contact/_search?pretty=true' -d '
{
"query" : {
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
@imotov
imotov / stop-words-test.log
Created Apr 11, 2012 — forked from kwloafman/stop-words-test.log
Stop Words in Quoted vs Unquoted Search
View stop-words-test.log
{"ok":true,"acknowledged":true}
{"ok":true,"acknowledged":true}
{"ok":true,"_index":"test","_type":"content","_id":"1","_version":1}
{"ok":true,"_index":"test","_type":"content","_id":"2","_version":1}
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 5,
@imotov
imotov / geo_distance_test
Created Jun 23, 2011 — forked from mauricioalarcon/geo_distance_test
geo_distance test for ES
View geo_distance_test
# Delete all pins
curl -X DELETE "http://localhost:9200/pins/pin"
# Create proper mapping
curl -XPUT 'http://localhost:9200/pins/pin/_mapping' -d '
{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
You can’t perform that action at this time.