Hi all,
I had an ES search running on ES 2 that was working as I hoped but since upgrading to ES5 and subsequently to ES 6 the relevance has degraded somewhat (probably due to poor DSL I guess). Its just a shame that it was working nicely and now isn't.
So we have a number of documents that contain some codes such as '1/2' or '000045/000009' as well lots of bespoke screen text (from a third party application).
We have a single 'search everything' input box and go button, a la Google, which has stopped providing the relevance we got used to with ES2.
As part of the upgrade we changed the Code field to be stored as a keyword and the screen text is still stored as text (there's a lot of this; lots of names and addresses mostly, amongst other types of data).
I was hoping someone might be able to help shed light on why the query below isn't returning a document with a code exactly matching '1/2' as the first hit? I get about 140 hits before it where the is a number 1 or 2 somewhere on a piece of screen data..?
{
"query": {
"bool": {
"filter": [
{
"terms": {
"systemId": [
1,
2
]
}
}
],
"minimum_should_match": 1,
"should": [
{
"multi_match": {
"fields": [
"code",
"code.standard",
"name",
"notes",
"notes.english",
"shortName"
],
"query": "1/2",
"type": "best_fields"
}
},
{
"nested": {
"path": "matterKeyDates",
"query": {
"multi_match": {
"fields": [
"matterKeyDates.notes",
"matterKeyDates.notes.english"
],
"query": "1/2",
"type": "best_fields"
}
}
}
},
{
"nested": {
"path": "screenData",
"query": {
"multi_match": {
"fields": [
"screenData.valueString",
"screenData.valueString.english"
],
"query": "1/2",
"type": "best_fields"
}
}
}
}
]
}
},
"size": 10,
"_source": {
"excludes": [
"screenData.*"
]
}
}
Any help appreciated ...