3

I'm using a legacy ES 2.3 and searchkick 2.5 versions in an app.

A custom mapping is defined in a model.

mappings: {
  my_model: {
    properties: { 
      ...
      suggestion: { type: "completion", analyzer: "ru_RU", search_analyzer: "ru_RU" }
    }
  }
}

def search_data
  {
    ...
    suggestion: suggestions
  }
end

# a custom method on the model to fill suggestions
def suggestions
 ['some', 'suggestions'] # an array 
end

When I'm trying to reindex the model I get Mixing up field types: class org.elasticsearch.index.mapper.core.StringFieldMapper$StringFieldType != class org.elasticsearch.index.mapper.core.CompletionFieldMapper$CompletionFieldType on field suggestion error.

What am I doing wrong? Would really appreciate any help with solving this issue.

  • solved by upgrading ES version to 2.4 – Fenec Jun 11 at 21:38
2

solved by upgrading ES version to 2.4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.