Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Expose searching as bool query, rather than isolated _aknn_search #3

@arclabs561

Description

@arclabs561

The motivation is that I would like to combine the KNN search with other bool clauses, or combine the score with other queries. Preferably, I would like to do something like

GET localhost:9200/twitter_images/twitter_image/_search
{
    "size": 10,
    "query": {
        "bool": {
            "should": [
                {"term": {"name": "Some Name"}},
                {"aknn": {
                    "vec": [0.1, 0.2, ...],
                    "k1": 1000,
                }},
            ],
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions