Need help for Custom Score On Array Fields

Hi All,

Currently I have an array type, and I need to calculate score base on num
matched terms filters.
For example:

Here is my mappings :

{
"tweet" : {
"properties" : {
"tags" : {"type" : "string", "index_name" : "tag"},
}
}
}

My data will be indexed like that :

{
"tweet" : {
"tags" : ["USA","VN","GM"]
}
}

So if I query with terms filter for : "USA", and "GM"

My score will be 2/3 (it's mean num matched / tags array). (actually the
score will be calculated with complex formal, but I just one to focus on
the problem)

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3d047dbe-20d4-43ac-92c1-d1e21322c13c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.