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.
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.