Hey Guys,
I have a question to put on you guys again..
in the query below I have a nested query element with a function score...
BUT... it doesnt appear to be filtering based on that function like I had
hoped....
any thoughts?
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"and": [
{
"terms": {
"owk": [
23621
]
}
},
{
"terms": {
"oowk": [
23621
]
}
},
{
"term": {
"ismd": true
}
},
{
"and": [
{
"and": [
{
"term": {
"ipl": false
}
},
{
"terms": {
"pwk": [
21754
]
}
},
{
"range": {
"lsdt": {
"gte": "2014-09-20",
"lte": "2014-09-30"
}
}
},
{
"term": {
"isb": false
}
}
]
},
{
"query": {
"function_score": {
"boost_mode": "multiply",
"functions": [
{
"script_score": {
"params": {
"min_value": 2,
"max_value": 2
},
"script": "(max_value == null ||
_score <= max_value) && (min_value == null || _score >= min_value)?1:-1"
}
}
],
"query": {
"filtered": {
"query": {
"has_child": {
"type": "service",
"score_type": "total",
"query": {
"filtered": {
"filter": {
"and": [
{
"terms": {
"owk": [
23621
]
}
},
{
"range": {
"dt": {
"gte":
"2014-09-20",
"lte":
"2014-09-30"
}
}
}
]
}
}
}
}
},
"filter": {
"terms": {
"owk": [
23621
]
}
}
}
}
}
}
}
]
}
]
}
}
},
"from": 0,
"size": 0,
"aggs": {
"unique": {
"cardinality": {
"field": "hhk",
"precision_threshold": 40000
}
}
}
}
--
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/67a55e78-15ff-4616-a637-e565de30cb9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.