Percolator is not working with source field in the query

percolator query:

PUT mp_percolator/notification/anoop_test
{
    "source": {
        "query": {
            "bool": {
                "must": [
                    {
                        "bool": {
                            "must": {
                                "bool": {
                                    "should": [
                                        {
                                            "bool": {
                                                "must": [
                                                    {
                                                        "query_string": {
                                                            "query": "a*",
                                                            "quote_analyzer": "standard",
                                                            "allow_leading_wildcard": "true",
                                                            "analyze_wildcard": "true",
                                                            "default_operator": "AND",
                                                            "phrase_slop": 1
                                                        }
                                                    },
                                                    {
                                                        "script": {
                                                            "script": {
                                                                "source": "Pattern p = {{param_0}}; p.matcher(params._source.summary ?: '').find();",
                                                                "lang": "painless"
                                                            }
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    }
                ]
            }
        },
        "sort": [
            {
                "headline.case_insensitive_sort_raw": "asc"
            }
        ]
    },
    "params": {
        "param_0": "/\\s?a\\S*?/i"
    }
}

Percolator search:

GET mp_perculator/_search
{
  "query": {
    "percolate": {
      "field": "query",
      "document_type": "doctype",
      "index": "index_testing",
      "type": "mediaitems",
      "id": "262469089"
    }
    
  }
}

Noting matching!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.