3

Code is in Scala. It is extremely similar to Java code.

Code that our map indexer uses to create index: https://gist.github.com/a16e5946b67c6d12b2b8

Utilities that the above code uses to create index and mapping: https://gist.github.com/4f88033204cd761abec0

Errors that java gives: https://gist.github.com/d6c835233e2b606a7074

Response of http://elasticsearch.domain/maps/_settings after running code and getting errors: https://gist.github.com/06ca7112ce1b01de3944

JSON FILES: https://gist.github.com/bbab15d699137f04ad87 https://gist.github.com/73222e300be9fffd6380

Attached are the json files i'm loading in. I have confirmed that it is loading the right json files and properly outputting it as a string into .loadFromSource and .setSource.

Any ideas why it can't find the analyzers even though they are in _settings? If I run these json files via curl they work fine and properly setup the mapping.

1 Answer 1

4

The code I was using to create the index (found here: Define custom ElasticSearch Analyzer using Java API) was creating settings in the index like:

"index.settings.analysis.filter.my_snow.type: "stemmer","

It had settings in the setting path.

I changed my indexing code to the following to fix this:

def createIndex(client: Client, indexName: String, indexFile: String) {
  //Create index
    client.admin().indices().prepareCreate(indexName)
    .setSource(Utils.loadFileAsString(indexFile))
    .execute()
    .actionGet()
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.