I've got a cluster with such index:
{
state: open
settings: {
index.analysis.analyzer.default.filter: my_filter
index.number_of_replicas: 1
index.analysis.filter.my_filter.type_table.-: ALPHANUM
index.analysis.filter.my_filter.preserve_original: 1
index.analysis.filter.my_filter.type: word_delimiter
index.number_of_shards: 4
index.analysis.analyzer.default.type: custom
index.analysis.analyzer.default.tokenizer: whitespace
}
mappings: {
test123: {
properties: {
wojewodztwo: {
type: string
}
_pk: {
type: long
}
_insertDateTime: {
type: long
}
nazwa_zam: {
type: string
}
przedmiot_zam: {
type: string
}
IDwykonawcy: {
type: string
}
_insertUsec: {
type: long
}
wartosc: {
type: float
}
nazwa: {
type: string
}
data_publikacji: {
type: integer
}
CPV_nazwa: {
type: string
}
}
}
}
aliases: [ ]
}
and I'm quering elasticsearch in ElasticSearch Head with:
{
query: {
bool: {
must: [
{
fuzzy: {
przedmiot_zam: {
value: R-A
min_similarity: 0.9
}
}
}
]
must_not: [ ]
should: [ ]
}
}
from: 0
size: 50
sort: [ ]
facets: { }
}
and than through PHP with:
Array ( [from] => 0 [size] => 0 [sort] => Array ( [0] => Array
( [_score] => desc ) ) [query] => Array ( [bool] => Array ( [must] =>
Array ( [0] => Array ( [fuzzy_like_this] => Array ( [fields] => Array
( [0] => przedmiot_zam ) [like_text] => R-A [min_similarity] =>
0.9 ) ) ) [must_not] => Array ( ) [should] => Array ( ) ) ) [facets]
=> Array ( ) )
question: why am I getting diferent query results? in elastic head I
have proper ones in PHP not
I want elasticsearch to ignore the "-" and don't treat it as delimiter
so when I will search for "e-learning" it will find only it, not all
"e" "-" and "learning"