Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-5571 Autocomplete with ontologies not working for CMH #686

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public CellBaseIterator<OntologyTerm> iterator(OntologyQuery query) throws CellB
QueryOptions queryOptions = query.toQueryOptions();

MongoDBCollection mongoDBCollection = getCollectionByRelease(mongoDBCollectionByRelease, query.getDataRelease());
System.out.println("ontology mongodb adaptor: mongoDBCollection = " + mongoDBCollection.toString() + ", data release = "
pfurio marked this conversation as resolved.
Show resolved Hide resolved
+ query.getDataRelease());
MongoDBIterator<OntologyTerm> iterator = mongoDBCollection.iterator(null, bson, projection, CONVERTER, queryOptions);
return new CellBaseMongoDBIterator<>(iterator);
}
Expand Down Expand Up @@ -114,9 +116,15 @@ public Bson parseQuery(OntologyQuery query) {
try {
for (Map.Entry<String, Object> entry : query.toObjectMap().entrySet()) {
String dotNotationName = entry.getKey();
if (!"dataRelease".equals(dotNotationName)) {
Object value = entry.getValue();
createAndOrQuery(value, dotNotationName, QueryParam.Type.STRING, andBsonList);
switch (dotNotationName) {
case "dataRelease":
pfurio marked this conversation as resolved.
Show resolved Hide resolved
case "apiKey":
// Nothing to do
break;
default: {
Object value = entry.getValue();
createAndOrQuery(value, dotNotationName, QueryParam.Type.STRING, andBsonList);
}
}
}
} catch (IllegalAccessException e) {
Expand Down
Loading