Transform with custom query DSL

Hello,

I’m trying to create a transform job, that will archive specific indices filtered from the source index. This should be possible with Source index filter.

In step 1, I select source index, enter the filter, type a new index name and move to step 2. When the filter was specified, I always get the following error when trying to add a transform in step 2:

Could not preview transform: [parsing_exception] unknown query [query], with { line=1 & col=10 }

This error appears even when I paste the example DSL query that is referenced in the first step Learn more link.

{
  "query": {
  "multi_match": {
    "query": "QUEEN",
    "fields": ["speaker", "text_entry"]
    }
  }
}

What am I doing wrong?

Hi,

Currently checking the problem. Can you provide the version you are using?

Thanks,
Annie

From OpenSearch Dashboards, it seems the query DSL object is already has “query”. So changing the DSL query to the following should work.

{
  "multi_match": {
    "query": "QUEEN",
    "fields": ["speaker", "text_entry"]
    }
  }

That did it, thanks!