Skip to content

Instantly share code, notes, and snippets.

@Mpdreamz
Created May 6, 2013 12:36
Show Gist options
  • Save Mpdreamz/5524841 to your computer and use it in GitHub Desktop.
Save Mpdreamz/5524841 to your computer and use it in GitHub Desktop.
Different search result since 0.90.0
POST http://local.localghost.io:9200/nest_test_data-9232/elasticsearchprojects/_search?pretty=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: local.localghost.io:9200
Content-Length: 444
Expect: 100-continue
{
"from": 0,
"size": 20,
"filter": {
"bool": {
"must": [
{
"match_all": {}
}
],
"must_not": [
{
"term": {
"name": "elasticflume"
}
}
],
"should": [
{
"exists": {
"field": "loc"
}
}
]
}
},
"fields": [
"id",
"name",
"loc"
]
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 3871
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 15,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "0",
"_score" : 1.0,
"fields" : {
"id" : 0,
"loc" : 12088,
"name" : "em-elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "1",
"_score" : 1.0,
"fields" : {
"id" : 1,
"loc" : 11180,
"name" : "pyelasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "2",
"_score" : 1.0,
"fields" : {
"id" : 2,
"loc" : 13149,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "3",
"_score" : 1.0,
"fields" : {
"id" : 3,
"loc" : 19313,
"name" : "Terrastore Search"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "5",
"_score" : 1.0,
"fields" : {
"id" : 5,
"loc" : 19602,
"name" : "Wonderdog"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "6",
"_score" : 1.0,
"fields" : {
"id" : 6,
"loc" : 19578,
"name" : "Wonderdog"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "7",
"_score" : 1.0,
"fields" : {
"id" : 7,
"loc" : 11942,
"name" : "em-elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "8",
"_score" : 1.0,
"fields" : {
"id" : 8,
"loc" : 13867,
"name" : "slingshot"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "9",
"_score" : 1.0,
"fields" : {
"id" : 9,
"loc" : 12939,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "10",
"_score" : 1.0,
"fields" : {
"id" : 10,
"loc" : 13006,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "11",
"_score" : 1.0,
"fields" : {
"id" : 11,
"loc" : 12825,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "12",
"_score" : 1.0,
"fields" : {
"id" : 12,
"loc" : 17547,
"name" : "catalyst"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "13",
"_score" : 1.0,
"fields" : {
"id" : 13,
"loc" : 10508,
"name" : "ElasticSearch.pm"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "15",
"_score" : 1.0,
"fields" : {
"id" : 15,
"loc" : 10148,
"name" : "ElasticSearch.pm"
}
}, {
"_index" : "nest_test_data-9232",
"_type" : "elasticsearchprojects",
"_id" : "17",
"_score" : 1.0,
"fields" : {
"id" : 17,
"loc" : 19344,
"name" : "Terrastore Search"
}
} ]
}
}
POST http://local.localghost.io:9200/nest_test_data-6668/elasticsearchprojects/_search?pretty=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: local.localghost.io:9200
Content-Length: 444
Expect: 100-continue
{
"from": 0,
"size": 20,
"filter": {
"bool": {
"must": [
{
"match_all": {}
}
],
"must_not": [
{
"term": {
"name": "elasticflume"
}
}
],
"should": [
{
"exists": {
"field": "loc"
}
}
]
}
},
"fields": [
"id",
"name",
"loc"
]
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4599
{
"took" : 49,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 18,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "0",
"_score" : 1.0,
"fields" : {
"id" : 0,
"loc" : 12088,
"name" : "em-elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "1",
"_score" : 1.0,
"fields" : {
"id" : 1,
"loc" : 11180,
"name" : "pyelasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "2",
"_score" : 1.0,
"fields" : {
"id" : 2,
"loc" : 13149,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "3",
"_score" : 1.0,
"fields" : {
"id" : 3,
"loc" : 19313,
"name" : "Terrastore Search"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "4",
"_score" : 1.0,
"fields" : {
"id" : 4,
"loc" : 18424,
"name" : "elasticflume"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "5",
"_score" : 1.0,
"fields" : {
"id" : 5,
"loc" : 19602,
"name" : "Wonderdog"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "6",
"_score" : 1.0,
"fields" : {
"id" : 6,
"loc" : 19578,
"name" : "Wonderdog"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "7",
"_score" : 1.0,
"fields" : {
"id" : 7,
"loc" : 11942,
"name" : "em-elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "8",
"_score" : 1.0,
"fields" : {
"id" : 8,
"loc" : 13867,
"name" : "slingshot"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "9",
"_score" : 1.0,
"fields" : {
"id" : 9,
"loc" : 12939,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "10",
"_score" : 1.0,
"fields" : {
"id" : 10,
"loc" : 13006,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "11",
"_score" : 1.0,
"fields" : {
"id" : 11,
"loc" : 12825,
"name" : "ruby_elasticsearch"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "12",
"_score" : 1.0,
"fields" : {
"id" : 12,
"loc" : 17547,
"name" : "catalyst"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "13",
"_score" : 1.0,
"fields" : {
"id" : 13,
"loc" : 10508,
"name" : "ElasticSearch.pm"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "14",
"_score" : 1.0,
"fields" : {
"id" : 14,
"loc" : 18445,
"name" : "elasticflume"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "15",
"_score" : 1.0,
"fields" : {
"id" : 15,
"loc" : 10148,
"name" : "ElasticSearch.pm"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "16",
"_score" : 1.0,
"fields" : {
"id" : 16,
"loc" : 18824,
"name" : "elasticflume"
}
}, {
"_index" : "nest_test_data-6668",
"_type" : "elasticsearchprojects",
"_id" : "17",
"_score" : 1.0,
"fields" : {
"id" : 17,
"loc" : 19344,
"name" : "Terrastore Search"
}
} ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment