[fixes #68] Use hash_key in query to filter returned items

The hash_key was not used in the query method, as a result all items where returned.
This fix issue #68.