Removed an irregularity from the get_results_with_descriptors function
The irregularity in question, the special treatment given to the
query_dataset parameter, is now in the get_results function instead
@@ -117,13 +117,13 @@ def enumerate_result_files(dataset = None, limit = None, count = None,
def get_results(dataset, limit, count, distance, query_dataset = None):
for d, results in get_results_with_descriptors(
dataset, limit, count, distance, query_dataset):
+ if d["query_dataset"] == query_dataset:
yield results
def get_results_with_descriptors(
- dataset, limit, count, distance, query_dataset = None):
+ dataset, limit, count, distance, query_dataset):
for d, fn in enumerate_result_files(dataset, limit, count, distance,
query_dataset):
- if d["query_dataset"] == query_dataset:
with gzip.open(fn, "r") as fp:
try:
yield (d, json.load(fp))
