-
Notifications
You must be signed in to change notification settings - Fork 807
Closed
Labels
Description
running rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
currently result in the following error: ActionView::Template::Error ... failed to parse search source. unknown search element [facets] ...
see the full log here:
Started GET "/" for 127.0.0.1 at 2016-01-16 22:12:23 +0100 ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Processing by SearchController#index as HTML Article Search (8.2ms) {index: "searchapp_application_development", type: "article", body: {query: {match_all: {}}, highlight: {pre_tags: [""], post_tags: [""], fields: {title: {number_of_fragments: 0}, abstract: {number_of_fragments: 0}, content: {fragment_size: 50}}}, filter: {}, facets: {categories: {terms: {field: "categories"}, facet_filter: {}}, authors: {terms: {field: "authors.full_name.raw"}, facet_filter: {}}, published: {date_histogram: {field: "published_on", interval: "week"}, facet_filter: {}}}, sort: {published_on: "desc"}}, size: 25, from: 0} Rendered search/index.html.erb within layouts/application (20.9ms) Completed 500 Internal Server Error in 61ms (ActiveRecord: 0.2ms | Elasticsearch: 8.2ms) ActionView::Template::Error ([400] {"error":{"root_cause":[{"type":"search_parse_exception","reason":"failed to parse search source. unknown search element [facets]","line":1,"col":239}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query_fetch","grouped":true,"failed_shards":[{"shard":0,"index":"searchapp_application_development","node":"Jsi8lCo4Se2c-xcdIQQ_yA","reason":{"type":"search_parse_exception","reason":"failed to parse search source. unknown search element [facets]","line":1,"col":239}}]},"status":400}): 24: 25: 26:27:Displaying <%= (params[:page] || 1).to_i.ordinalize %> page with <%= @articles.size %> articles 28: of total <%= @articles.total %>
29: 30: app/views/search/index.html.erb:27:in `block in _app_views_search_index_html_erb__4565196024839181062_47154999019880' app/views/search/index.html.erb:4:in `_app_views_search_index_html_erb__4565196024839181062_47154999019880'
here it is the stack version:
$ curl localhost:9200 { "name" : "Stinger", "cluster_name" : "elasticsearch", "version" : { "number" : "2.1.1", "build_hash" : "40e2c53a6b6c2972b3d13846e450e66f4375bd71", "build_timestamp" : "2015-12-15T13:05:55Z", "build_snapshot" : false, "lucene_version" : "5.3.1" }, "tagline" : "You Know, for Search" } $ rails -v Rails 4.2.5 $ ruby -v ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] $ java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) $ uname -a Linux basenode 4.2.0-23-generic #28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux