Hi Elastic team,
I've been trying to fix an issue with our match for a few days now where my search for this phrase "Finished IT Project" won't match anything, here is what I have tried so far:
1- Removed IT as stop word
2- Removed All stop words
3- Match Phrase as:
{
"query": {
"match_phrase" : {
"message" : {
"query" : "Finished IT Project",
"analyzer" : "my_english"
}
}
}
}
4- Common Term as:
{
"query": {
"common": {
"body": {
"query": "Finished Court IT Project",
"cutoff_frequency": 0.001,
"minimum_should_match": {
"low_freq" : 2,
"high_freq" : 3
}
}
}
}
}
5- must match as:
{
"query": {
"bool": {
"must": {
"term": {
"post_title": "Finished IT Project"
}
}
}
}
}
Here is the result of the analyzer:
{
"analyzer": "my_english",
"text": "Finished IT Project"
}
Result:
{
"tokens": [
{
"token": "finish",
"start_offset": 0,
"end_offset": 8,
"type": "<ALPHANUM>",
"position": 0
},
{
"token": "project",
"start_offset": 12,
"end_offset": 19,
"type": "<ALPHANUM>",
"position": 2
}
]
}
Note, at this point I restored the stop words since removing them created a slow down in searching.
And no option seems to return any story with those words in it's text, I know we have a few, and those 3 words are present in at least 2 of our titles but none are returned, I did notice that the word "Finished" get changed to "finish" for some odd reason.
Any help will be much appreciated, thanks and happy new year.