mercredi 25 novembre 2015

searchkick 400 [searchkick_search] not found

Someone is having this kind of problem with searchkick? i did something wrong? someone can spare a hint?

thank's

controller:

@products = Product.search(params[:query], page: params[:page])

model:

after_touch :reindex

 searchkick mappings: {
    product: {
      properties: {
        name: {type: "string", analyzer: "keyword"}
      }
    }
  }
   def search_data
    as_json only: [:name, :price]
    # or equivalently
    {
      name: name,
      price: price
    }
  end

after_touch :reindex

 searchkick mappings: {
    product: {
      properties: {
        name: {type: "string", analyzer: "keyword"}
      }
    }
  }
   def search_data
    as_json only: [:name, :price]
    # or equivalently
    {
      name: name,
      price: price
    }
  end

[400] {"error":{"root_cause":[{"type":"query_parsing_exception","reason":"[match] analyzer [searchkick_search] not found","index":"products_development_20151125203817235","line":1,"col":89}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"products_development_20151125203817235","node":"f2jvKNboRcGf0NF11yEqyw","reason":{"type":"query_parsing_exception","reason":"[match] analyzer [searchkick_search] not found","index":"products_development_20151125203817235","line":1,"col":89}}]},"status":400}

Aucun commentaire:

Enregistrer un commentaire