Hi,
my mappings currently looks like this (Python code)
{
'meeting': {
'properties': {
'user': {'type': 'float'},
'subject': {'type': 'string',},
'notes': {'type': 'text'},
'created': {'type': 'date', 'format': 'yyyy/MM/dd HH:mm:ss'},
}
}
}
body = {'mappings': mappings}
return es.indices.create(index=INDEX_NAME, body=body)
and I'm trying to make a query:
search_query = {
"query": {
"function_score": {
"functions": [
{
"script_score": {
"script": "_score * doc['subject'][Something].tf()"
}
}],
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": keyword,
"fields": [
"notes^5",
]
},
},
{
"term": {
"user": USER_ID,
},
},
{
"range": {
"created": {
"gte": created_gte,
}
},
},
],
},
},
},
}
}
My problem is with script_score
part. After adding it i've got TransportError(400, 'search_phase_execution_exception', 'compile error')
What I;m doing wrong?
Elasticsearch version: 5.1.2