-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not get decompound to work #13
Comments
Can you show the mapping where you use the |
I haven't it set to my mapping yet, as i expected the "raw" request to the analyzer would show me "all is running fine". |
If you want to change the default analyzer, you have to declare a |
Then for what is the "index" block? |
This project state is very old, it is for Elasticsearch 1.0.0, not 1.5. In 1.5, the |
Ok, reading the documentation back and forth i found a combination of directives that work. first index of ~72k documents took 5min instead of < 1 min PUT /<indexname>
{
"index": {
"analysis": {
"analyzer": {
"default": {
"tokenizer": "decomp",
"filter": [
"decomp",
"unique"
]
}
},
"filter": {
"decomp": {
"type": "decompound"
}
},
"tokenizer": {
"decomp": {
"type": "standard",
"filter": [
"decomp"
]
}
}
}
}
} final XContentBuilder settingsBuilder = jsonBuilder()
.startObject()
.startObject("index")
.startObject("analysis")
.startObject("analyzer")
.startObject("default") // = generell und für alle felder
.field("tokenizer", "decomp")
.field("filter", new String[] {"decomp", "unique"})
.endObject()
.endObject()
.startObject("filter")
.startObject("decomp")
.field("type", "decompound")
.endObject()
.endObject()
.startObject("tokenizer")
.startObject("decomp")
.field("type", "standard")
.startArray("filter")
.field("decomp")
.endArray()
.endObject()
.endObject()
.endObject()
.endObject()
.endObject();
final CreateIndexRequestBuilder createIndexRequestBuilder = client.admin().indices().prepareCreate(indexName);
createIndexRequestBuilder.setSettings(ImmutableSettings.settingsBuilder().loadFromSource(settingsBuilder.string())); |
I have the current Elasticsearch version (1.5.2) and tried to setup decompound with the thin readme. I got not the expected results.
Tested with:
GET leads/_analyze?
{Die Jahresfeier der Rechtsanwaltskanzleien auf dem Donaudampfschiff hat viel Ökosteuer gekostet}
Results in, which is not the same as shown in the readme:
Equivalent setup in via java api did not change the outcome.
I tried also the your pack of plugins with the same result.
And yes I did the restart of my test elasticsearch server, otherwise it should have bailed out to create a filter of type decompound.
The text was updated successfully, but these errors were encountered: