Skip to content

collections created by api routes are not returned in search #257

@tcnichol

Description

@tcnichol

Describe the bug
If you create a collection using the api route (tested using pyclowder client) and then use the search api route, that new collection will not be returned.

To Reproduce

Created a new collection with this:

data = {"name":"new collection 1"} client.post('/collections', content=data, params=data)

And then this route returns no results:

result = client.get('/search', params={'query': 'new collection 1', 'resource_type': 'collection'})

Expected behavior

When fixed, creating a collection with the api route should mean that the search finds the collection.

From looking at the api route, it appears that some indexing with elasticsearch happens in the controller route, but not in the api route. The dataset api route has the proper indexing so this does not happen with datasets, just collections.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions