comparison query.cpp @ 466:11fccb6a3bd5 api-inversion

Almost there! audioDB::index_query_loop is now set, except for the lsh_in_core and lsh_exact flags. I think the plan is to zap lsh_in_core entirely, and add some flags to the qid structure for indexed behaviour.
author mas01cr
date Wed, 31 Dec 2008 12:25:22 +0000
parents 1030664df98c
children 4dbd7917bf9e
comparison
equal deleted inserted replaced
465:1030664df98c 466:11fccb6a3bd5
226 } 226 }
227 227
228 // Test for index (again) here 228 // Test for index (again) here
229 if((qspec.refine.flags & ADB_REFINE_RADIUS) && audiodb_index_exists(adb->path, qspec.refine.radius, qspec.qid.sequence_length)){ 229 if((qspec.refine.flags & ADB_REFINE_RADIUS) && audiodb_index_exists(adb->path, qspec.refine.radius, qspec.qid.sequence_length)){
230 VERB_LOG(1, "Calling indexed query on database %s, radius=%f, sequence_length=%d\n", adb->path, qspec.refine.radius, qspec.qid.sequence_length); 230 VERB_LOG(1, "Calling indexed query on database %s, radius=%f, sequence_length=%d\n", adb->path, qspec.refine.radius, qspec.qid.sequence_length);
231 index_query_loop(adb, &qspec, &qstate); 231 if(index_query_loop(adb, &qspec, &qstate) < 0) {
232 } 232 error("index_query_loop failed");
233 else { 233 }
234 } else {
234 VERB_LOG(1, "Calling brute-force query on database %s\n", dbName); 235 VERB_LOG(1, "Calling brute-force query on database %s\n", dbName);
235 if(audiodb_query_loop(adb, &qspec, &qstate)) { 236 if(audiodb_query_loop(adb, &qspec, &qstate)) {
236 error("audiodb_query_loop failed"); 237 error("audiodb_query_loop failed");
237 } 238 }
238 } 239 }