Skip to content

/collection/{c_id}/items should use search method rather than custom code #63

Closed
@philvarner

Description

@philvarner

item_collection uses:

        collection_filter = Q(
            "bool", should=[Q("match_phrase", **{"collection": collection_id})]
        )

but should instead use the same search method as /search does -- the only difference between these endpoints is that the collection is in the path rather than a parameter.

As for the query, should in ES means "or", and "match_phrase" is like a free-text query. Instead, this should be a filter with a term query against collection .

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions