Skip to content

Terms lookup feature no longer supported due to recent release #1920

Closed
@bptarpley

Description

@bptarpley

A recent release appears to have broken the ability to perform a "terms lookup" query which is a special subset of terms query which allows you to specify the index, id, and field so you can limit terms to those found in a specific document in another index:

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html#query-dsl-terms-lookup

I used to be able to create a "terms lookup" query like so:

Q('terms', **{'_id': {
    'index': 'my-other-index',
    'id': 'my-document-id',
    'path': 'my-field'
}})

Now, however, the query generated flattens the dictionary into a list of keys, so that what actually gets built is this:

"terms": {
    "_id": [
        "index",
        "id",
        "path"
    ]
}

This seems to be an unintended side-effect of a recent release. Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions