52. Search
New UI in 5.0.3 in: Web, Insight
Purpose of the test is to check that Insight and Web have the same Search UI and return valid results with each query. All searches below should be performed at the same time in Insight and Web and the displayed results should be identical in both clients.
See also
Query Parser Syntax for how to write search queries.
See also
- Luke
a Java application which you can download and point at your
/OMERO/FullTextdirectory to get a better feeling for Lucene queries. Downloadlukeall-3.5.0.jarand dojava -jar lukeall-3.5.0.jar -ro -index /OMERO/FullText/.
Test links and tools
Check that the Hints button (under
?sign in Insight andShow Search hintsin Web) opens and the message makes sense.Check that the link to the Help webpage inside the Hints button works.
Test default search
Start by entering a search query in the tool-bar search box in the main client window. Type query and hit Enter or click search button.
Check that you are taken to the search ‘page’/UI with your search query entered into the search field, and that the search has been performed with the results appearing in the center panel.
Check that the Web and Insight search forms have all the same fields and that the defaults are the same.
Check that the objects searched for are
Projects,Datasets,Images,Screens,Plates(all checkboxes selected by default).Check that no fields are chosen by default: Checkboxes for
Name,Description,Annotationsare all unchecked.Check that the default
Scopefor the search isAll Groups, with user matching the username you are logged in as, e.g.``user-4 user-4``.Check that no date range has been chosen by default.
Test various search queries
Test single keywords by entering one word into the search field.
Check that searching with a single keyword returns results where every result contains the keyword in
Name,DescriptionorAnnotation.Check that same results returned by Web and Insight.
Search for multiple keywords separated by spaces.
Check that the clients use OR logic in this case, but that the Results list is sorted in such a manner that the results which contain most keywords are on the top of the list. See also the limitations in Tokenizing
Select to search for
Nameonly by checking theNamecheckbox. Search for single keyword.Check that all results have the keyword in their name.
Search for two or more keywords, separated by spaces, with
Namefield checked.Check that all results have one or more of the keywords in their name.
Check that results with most keywords in their name are ordered first.
Search for two or more keywords, separated by
AND, withNamefield checked.Check that all results have ALL keywords in their name.
Search for multiple words within double quotes.
Check that only results containing the quoted words are returned See also Limitations in Quotes
Use wildcards in searches, with
?replacing a single character and*replacing 1 or more characters.Check that results are consistent with this wildcard behaviour.
Check that leading wildcards, where the search starts with
?or*also work.Check that wildcards work in both keywords of a 2-keyword search.
See also Limitations in Wildcards
Try searches including various non-alphanumeric characters, including wildcards,
ANDand OR (for OR use logic only, not the OR string itself, note that the OR logic is a default in clients).Check that no exceptions are thrown.
Check also test with single characters or wildcards.
See also Limitations in Wildcards
See also Limitations in Advanced Search
Check that Search for two terms with
ANDin between with fields ticked will return the result if the two terms are:in the same ticked field (e.g.
weird AND blawill return a result ifNameis ticked and bothweirdandblaare in theName)one term in one ticked field and another term in another ticked field (e.g.
weird AND blawill return result when theweirdis in aNameandblais inDescriptionas long as bothNameandDescriptionare ticked)
Try search by ID: Enter a valid ID for Project, Dataset or Image, with all datatypes checked.
Check that the object is returned regardless of current group or group search, or
Data owned byoptions.Check that if the search query matches other objects by other fields, they are also returned.
Check that objects returned by ID appear at the top of search results.
Test object types and fields
Restrict the types of object you are searching for by unchecking Image, Dataset etc.
Check that you only get the specified object types returned.
Add a description to an Image, including various keywords that also exist in other Image names. Select
Descriptionfield only. Search for keywords within the description you added.Check that the Image is returned - NB: this also confirms that the index was updated.
Check that no objects are returned that don’t have the search terms in their description.
Add a text, csv or PDF file attachment to an Image, a Plate and a Screen, do not select any fields. Search for keywords within the content and name of the attachment you added. Note that the textfile must have the
.txt,.csvor.pdf, suffix to its name for the content search to succeed.Check that the Image, Plate and Screen are returned - NB: this also confirms that the index was updated.
Check that when you select the field
Annotationand search again, the Image, Plate and Screen with the attachment are returned again.
Test Scope
You need to be a member of several groups with a number of users in each. Each group needs to have some data owned by different users. Search with ‘All Groups’ chosen, and with your name (e.g.
user-4 user-4).Check that Group for each search result is shown in Results list.
Check that all data returned belongs to you, and is not restricted by group.
Search with ‘All Groups’ and ‘All Users’.
Check that data returned is not restricted by user or group.
Search within a specific group and with your username selected.
Check that data returned belongs to you, and only comes from the specified group.
Search within a specified group and ‘All Users’.
Check that results are from the specified group and not restricted by owner.
Search within a specified group and user.
Check that all results come from the specified group and belong to correct user.
Test date range
Enter a single ‘From’ date and search.
Check that you cannot pick a date in the future (Web only?)
Check that search results are all created after picked date.
Check that you cannot search with a ‘To’ date before the ‘From’ date.
Check that the ‘From’ date can be cleared and search is not now restricted by date
Enter a ‘To’ date only.
Check that you cannot pick a date in the future (Web only?)
Check that you cannot perform the search without also picking a ‘From’ date
Enter a ‘From’ and ‘To’ date.
Check that all results are created between the picked dates.
Search for
Import dateorAcquisition dateshould be implemented.Check that the
Import dateis the Default.Check that you can always search for
Import DateandAcquisition Datedate.Check that you can always see in the UI what date is shown (also in Results list) - there should be 2 separate columns.
Check that you can sort these columns by clicking on the bar above them.
Note that only some image formats have reliable Acquisition dates in OMERO, e.g.
svsNote that only images have Acquisition dates, P/D/S/Ps have only Imported date. Nevertheless, P/D/S/Ps will be found even when Acquisition date is specified only, which is a bit counter-intuitive, but expected.
(Insight only) Check that a search with an empty query but a valid date range returns results as expected (= all the items with the
Import dateorAcquisition datewithin the specified range).
Search Results
Go to the Search Results and select one.
(Web only) Check that you can navigate to the result in the data tree by clicking on the link in the rightmost column of the central pane.
Check that the right-hand pane is visible for P/D/S/P/I search results
Check that in Insight, in case of Images, you can navigate to the containing dataset using right-hand pane, and
Located in.Check that in Insight the
Located inlink will lead you to the correct result only when the group in which the result is located is on display (underProjectsharmonica).(Insight only) Check that if the group is not on display the links will lead you to Project tab. Click back to Search tab and select another image in the Results list and
(Insight only) Check that there are no Insight errors when doing so.
Known Limitations
- Tokenizing
The search queries are tokenized at the non-alphanumeric characters (except dash, underscore and colon), and then passed to Lucene. The OR logic between multiple tokens is implemented. The non-alphanumeric characters are ignored (except dash and underscore, which are accepted at face value). For the behaviour of colon see Map Annotations Search
- Quotes
The Quoted search will not keep everything as it is in quotes, instead it will tokenize at the non-alphanumeric signs and throw these away. Nevertheless, the order of the terms in the quotes is of importance and will be respected. For example
"weird_tag"and"weird-tag"queries will have the same Result, likeweird tag,weird_tagandweird-tagbut notweirdtagand nottag weirdorweird spacer tag.- Wildcards
The combination of a wildcard with any non-alphanumeric character search is not allowed and will be caught out with a warning message, e.g.
(*but also?*or**and*.*will give no results. Search for*.svsdefaults tosvs. The search for parts of alphanumerics groups must be done using wildcards, parts of alphanumeric groups only will return nothing, e .g. search forwewill NOT returnweird_image.svs, but search forwe*will.- Advanced Search
Search for
nd2 weird AND attachmenttakes the space betweend2andweirdas OR and returns the results which have bothweirdandattachmentORnd2in them.- Map Annotations Search
Additionally to the possiblity of searching single or multiple strings of Key:Value pairs in the Map Annotations, there is following logic implemented.
Temperature:37will find only Map Annotations (i.e. NOT OTHER types of Annotations) with KeyTemperatureAND Value37. KeyTemperaturewith Value40, as well as Key37with ValueTemperaturewill both be ignored. A further possibility is to search forhas_key:Temperaturewhich will return solely Map Annotations with this specific Key.