Giter Club home page Giter Club logo

Comments (3)

clintongormley avatar clintongormley commented on May 25, 2024

It seems to be related to running more than one node - if I use just one node and run the query below, then it works correctly:

curl -XGET 'http://127.0.0.2:9200/_all/_search'  -d '
{
   "query" : {
      "term" : {
         "text" : "foo"
      }
   },
   "facets" : {
      "bazFacet" : {
         "query" : {
            "term" : {
               "text" : "baz"
            }
         }
      }
   }
}
'

However, multiple facets are broken:

curl -XGET 'http://127.0.0.2:9200/_all/_search'  -d '
{
   "query" : {
      "term" : {
         "text" : "foo"
      }
   },
   "facets" : [
      {
         "bazFacet" : {
            "query" : {
               "term" : {
                  "text" : "baz"
               }
            }
         }
      },
      {
         "barFacet" : {
            "query" : {
               "term" : {
                  "text" : "baz"
               }
            }
         }
      }
   ]
}
'
# {
#    "hits" : {
#       "hits" : [],
#       "total" : 0
#    },
#    "_shards" : {
#       "failed" : 10,
#       "successful" : 0,
#       "total" : 10
#    }
# }

from elasticsearch.

kimchy avatar kimchy commented on May 25, 2024

Facet query crashes the cluster. Wrong serialzation of facets caused for construction of a rough sized array list. closed by 008b00f.

from elasticsearch.

clintongormley avatar clintongormley commented on May 25, 2024

Sorry - reposting in the issue:

I'm afraid your facet fix still doesn't work. I can now check for multiple facets (which if I remember correctly wasn't working yesterday) when running with one node, but with a second node, a facet search still crashes the cluster.

Test script below:

#!/bin/bash
set -o verbose
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/1'  -d '
{
   "num" : 2,
   "text" : "foo"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/2'  -d '
{
   "num" : 3,
   "text" : "foo"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/3'  -d '
{
   "num" : 4,
   "text" : "foo"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/4'  -d '
{
   "num" : 5,
   "text" : "foo"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/5'  -d '
{
   "num" : 6,
   "text" : "foo bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/6'  -d '
{
   "num" : 7,
   "text" : "foo bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/7'  -d '
{
   "num" : 8,
   "text" : "foo bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/8'  -d '
{
   "num" : 9,
   "text" : "foo bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/9'  -d '
{
   "num" : 10,
   "text" : "foo bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/10'  -d '
{
   "num" : 11,
   "text" : "foo bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/11'  -d '
{
   "num" : 12,
   "text" : "foo bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/12'  -d '
{
   "num" : 13,
   "text" : "foo bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/13'  -d '
{
   "num" : 14,
   "text" : "bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/14'  -d '
{
   "num" : 15,
   "text" : "bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/15'  -d '
{
   "num" : 16,
   "text" : "bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/16'  -d '
{
   "num" : 17,
   "text" : "bar baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/17'  -d '
{
   "num" : 18,
   "text" : "baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/18'  -d '
{
   "num" : 19,
   "text" : "baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/19'  -d '
{
   "num" : 20,
   "text" : "baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/20'  -d '
{
   "num" : 21,
   "text" : "baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/21'  -d '
{
   "num" : 22,
   "text" : "bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/22'  -d '
{
   "num" : 23,
   "text" : "bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/23'  -d '
{
   "num" : 24,
   "text" : "bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/24'  -d '
{
   "num" : 25,
   "text" : "bar"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_1/25'  -d '
{
   "num" : 26,
   "text" : "foo baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test/type_2/26'  -d '
{
   "num" : 27,
   "text" : "foo baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_1/27'  -d '
{
   "num" : 28,
   "text" : "foo baz"
}
'
curl -s -XPUT 'http://127.0.0.2:9200/es_test_2/type_2/28'  -d '
{
   "num" : 29,
   "text" : "foo baz"
}
'
curl -s -XPOST 'http://127.0.0.2:9200/_flush?refresh=true' 
curl -XGET 'http://127.0.0.2:9200/_all/_search?pretty=true'  -d '
{
   "query" : {
      "term" : {
         "text" : "foo"
      }
   },
   "facets" : {
      "bazFacet" : {
         "query" : {
            "term" : {
               "text" : "baz"
            }
         }
      }
   }
}
'

from elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.