forked from ome/omero_search_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into statement_timeout
- Loading branch information
Showing
19 changed files
with
1,257 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright (C) 2024 University of Dundee & Open Microscopy Environment. | ||
# All rights reserved. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
from utils import query_the_search_ending, logging | ||
|
||
# It is similar to use the 'in' operator in a sql statement, | ||
# rather than having multiple 'or' conditions, | ||
# it will only use a single condition. | ||
|
||
# The following example will search for the images which have any of the 'Gene Symbol' | ||
# values in this list ["Duoxa2", "Bach2", "Cxcr2", "Mysm1"] | ||
|
||
# and filters | ||
|
||
logging.info("Example of using in operator") | ||
|
||
|
||
values_in = ["Duoxa2", "Bach2", "Cxcr2", "Mysm1"] | ||
logging.info("Searching for 'Gene Symbol' with values in [%s]" % (",".join(values_in))) | ||
and_filters = [{"name": "Gene Symbol", "value": values_in, "operator": "in"}] | ||
|
||
main_attributes = [] | ||
query = {"and_filters": and_filters} | ||
# | ||
recieved_results_data = query_the_search_ending(query, main_attributes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright (C) 2024 University of Dundee & Open Microscopy Environment. | ||
# All rights reserved. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
from utils import query_the_search_ending, logging | ||
|
||
# It is similar to use the 'not in' operator in a sql statement, | ||
# rather than having multiple 'or' conditions with not_equals operators, | ||
# it will only use a single condition. | ||
|
||
# The following example will search for the images which have met any of the 'Organism' | ||
# values in this list | ||
# ["homo sapiens","mus musculus","mus musculus x mus spretus","human adenovirus 2"] | ||
|
||
# and filters | ||
|
||
logging.info("Example of using not_in operator") | ||
|
||
|
||
values_not_in = [ | ||
"homo sapiens", | ||
"mus musculus", | ||
"mus musculus x mus spretus", | ||
"human adenovirus 2", | ||
] | ||
logging.info("Searching for 'Organism' with values in [%s]" % (",".join(values_not_in))) | ||
and_filters = [{"name": "Organism", "value": values_not_in, "operator": "not_in"}] | ||
|
||
main_attributes = [] | ||
query = {"and_filters": and_filters} | ||
# | ||
received_results_data = query_the_search_ending(query, main_attributes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.