Hi,
I am trying for find the best way to index addresses.
The problem is that I get no match when input search have forward slash.
For example: I get no match for 1/3 example st.
I think the problem is the whitespace tokenizer produce this [1/3, example, st]. But I need [1,/,3,example,st]
How do I build a custom tokenizer to tokenize base up whitespace and forward slash?
This is what I have.
client.indices.create({
index: 'address',
body: {
settings: {
analysis: {
analyzer: {
address_analyzer: {
type: "custom",
tokenizer: "whitespace",
filter: [
"lowercase",
"asciifolding",
"synonym"
]
}
},
filter: {
synonym: {
type: "synonym",
synonyms_path: "analysis/street_types.txt"
}
}
}
}
}
client.indices.putMapping({
index: 'address',
type: 'singleAddress',
body: {
properties: {
suggest: {
type: "completion",
analyzer: "address_analyzer",
preserve_separators: "false"
}
}
}
});