Advanced Search component

Description

As a cataloger
I want to conduct complex searching to find the authority records I want to review

See slide deck

Display Advanced Search link Requirements

  • Below the search box display an Advanced Search link

  • When the user clicks on the link then display the Advanced Search modal

  • The Advanced Search modal should be component that other ui-modules can also use

Advanced Search modal Requirements

  • Display six rows
    ||Row#||Display||
    |1|Search for then a search box "in" search options dropdown|
    |2-6|Boolean operator single select dropdown then a search box "in" search options dropdown|

Boolean operator single select dropdown

  • Default: AND

  • Values: AND, OR, NOT

Search options single select dropdown

  • Default: Keyword

  • Values: Keyword, Identifiers, Personal name, Corporate/Conference, Geographic name, Name title, Uniform title, Subject, Children’s subject heading, and Genre (see below screenshot)

  • Two buttons: Cancel button and Search button

    • Cancel button: Closes modal and does not conduct the search

    • Search button: Closes modal and conducts the search

After hitting Search on Advanced Search modal Requirements

  • Set search options dropdown selection to Keyword (NOTE mockups are not updated but will be to reflect this requirement)

  • Display entire search in the Search box on the Search & Filter pane

Ways to revise search

  • Revise via the search box on the Search & Filter pane OR click the Advanced Search link

Ways to clear search

  • Hit Reset all button that appears below search box OR "x" that appears in search box on the Search & Filter pane

Advanced Search Query construction

  • May need to discuss these requirements with the Falcon team

  • Advanced search modal - first row search box MUST have a query. If it does not then display an error message below the first row search box [Enter a query in the first search box]

  • If a search row has no query then omit from sending to mod-search OR ensure does not impact search.

  • Advanced search query structure and order: <<first row selected search option and query>> <<second row selected BOOLEAN operator>> <<second row selected search option and query>> <<third row selected BOOLEAN operator>> <<third row selected search option and query>><<fourth row selected BOOLEAN operator>> <<fourth row selected search option and query>> <<fifth row selected BOOLEAN operator>> <<fifth row selected search option and query>><<six row selected BOOLEAN operator>> <<six row selected search option and query>>

  • By default search query sent to mod-search will just send the search query based on the order list above. No additional default logic or order will be applied.

  • Nested operator support: The user can nest a search within a search row which may change search operation

Examples - Search structure

Search row 1

Search row 2

Search row 3

Search row 4

Search row 5

Search row 6

Search structure

Expected search results returned

search query - water irrigation / search option selected - Subject

search boolean selected - OR search query - water drought / search option selected - Subject

n/a

n/a

n/a

n/a

subject = "water irrigation" OR subject = "water drought"

return authority headings and/or references that have the subjects water irrigation OR water drought

search query - schools / search option selected - Subject

search boolean selected - NOT search query - kindergarten / search option selected - Subject

n/a

n/a

n/a

n/a

subject = "schools" NOT subject = "kindergarten"

return authority headings and/or references that have the subject schools BUT NOT the subject kindergarten

search query - Williams, Joe / search option selected - Personal name

search boolean selected - AND search query - Joseph Goreed / search option selected - Personal name

n/a

n/a

n/a

n/a

personalname = "Williams,Joe" AND personalname = "Joseph Goreed"

return authority headings and/or references that have personal name Williams, Joe and Joseph Goreed

search query - Music / search option selected - Subject

search boolean selected - OR search query - Hymnals / search option selected - Genre

search boolean selected - OR search query - service books/ search option selected - Genre

n/a

n/a

n/a

subject = "Music" OR genre = "hymnals" OR genre = "service books"

return authority headings and/or references that have subject Music OR genres Hymnals or service books

search query - Morgan, J.P / search option selected - Personal name

search boolean selected - OR search query - Morgan, J.P. / search option selected - corporate/conference name

n/a

n/a

n/a

n/a

personalname = "Morgan, J.P." OR corporate/conferencename = "Morgan, J.P."

return authority headings and/or references that have personal name or corporate/conference name Morgan, J.P.

search query - Twain, Mark / search option selected - personal name

search boolean selected - AND search query - (Huckleberry Finn OR Tom Sawyer)/ search option selected - name title

n/a

n/a

n/a

n/a

personalname = "Twain, Mark" AND name title = ("Huckleberry Finn" OR "Tom Sawyer"

return authority headings and/or references that have the personal name Twain, Mark AND have the name title Huckleberry Finn OR Tom Sawyer

search query - schools / search option selected - Subject

search boolean selected - NOT search query - kindergarten / search option selected - Subject

search boolean selected - AND search query - water drought / search option selected - Subject

n/a

n/a

n/a

subject = "schools" NOT subject = "kindergarten" AND subject = "water drought"

return authority headings and/or references that have the subject schools BUT NOT the subject kindergarten AND subject water drought

search query - schools / search option selected - Subject

search boolean selected - AND search query - learning / search option selected - Subject

search boolean selected - OR search query - kindergarten / search option selected - Subject

n/a

n/a

n/a

subject = "schools" AND subject = "learning" OR subject = "kindergarten"

return authority headings and/or references that have both subject schools AND learning OR the subject kindergarten

h3. Advanced Search - Additional requirements

  • Facet/Filter interaction - Same behavior as if the user entered search query in the search box on the Search & Filter pane

  • When user enters a search query in the search box on the Search & Filter pane THEN that same query AND search option selection displays when the user clicks on the Advanced search link

  • If the user edits the Advanced search query via search box under the Search & filter pane THEN clicks Advanced Search then edited query displays in the first search box NO other search row boxes are populated. Search option selected on the first row is whatever last edited

  • If the user does not edit the Advanced search query via search box under the Search & Filter pane THEN clicks Advanced search then no change to the Advanced Search display

  • Do we need a loading results indicator?

Advanced Search modal accessibility requirements

  • Focus > upon accessing Advanced Search modal, focus and cursor should be on the first search box

  • Should be able to hit Enter in any search box to kick off search

  • Hitting search should shift focus on Results list paneheader

  • If no results returned, apply the right aria live region/state to ensure screenreader knows that no results have been found

Acceptance criteria

Given I have accessed the Advanced Search modal
AND I enter search query in the first row
WHEN I hit search
Then the results should display based on query AND any facets OR filters selected
AND the search box on the Search & Filter pane should display: Selected search option = Keyword AND search query <<selected search option>> = <<first search row query>>

Given I have accessed the Advanced Search modal
AND I enter search query in several rows including the first search row
WHEN I hit search
Then the results should display based on query entered in each search row AND any facets OR filters selected
AND the search box on the Search & Filter pane should display: Selected search option = Keyword AND search query <<selected search option per search row with a query>> = <each search row with a query>>
AND order is based on row query and boolean operator and search option is set

Given I have accessed the Advanced Search modal
AND I enter search query in several rows BUT not the first row
WHEN I hit search
Then do not execute search AND display an error message below the first row search box [Enter a query in the first search box]

Given I have accessed the Advanced Search modal
AND I enter search query in several rows including the first search row
AND one of the row encloses a query with parentheses for example (Montessori OR Kindergarten)
WHEN I hit search
Then the results should display based on query entered in each search row AND any facets OR filters selected
AND the query with parentheses should honor nested operation (Montessori or Kindergarten)
AND the search box on the Search & Filter pane should display: Selected search option = Keyword AND search query <<selected search option per search row with a query>> = <each search row with a query>>
AND order is based on row query and boolean operator and search option is set

Given I have accessed the Advanced Search modal
WHEN I hit cancel
Then do not execute search AND return me to the previous page WITH no change

Given I am on the Search & Filter pane
AND I have entered a search query for pesticides and selected the search option - Subject
AND I executed the search
When I click Advanced search
Then the modal displays pesticides in the first search row and Subject is the selected search option

Given I searched by using Advanced search
AND I edit the query via the search box on the Search & Filter pane
AND I hit Search
WHEN I hit Advanced search
Then the search query populated the first search row only
AND the search option selected is whatever the user set when s/he searched

Given I searched by using Advanced search
AND I do not edit the query via the search box on the Search & Filter pane
AND just change a filter or facet
AND I hit Search
WHEN I hit Advanced search
Then no change to query entered for a search row(s) / selected Boolean operator(s) / selected search option(s)

Given I searched by using Advanced search
AND I do not edit the query via the search box on the Search & Filter pane
WHEN I hit Advanced search
Then no change to query entered for a search row(s) / selected Boolean operator(s) / selected search option(s)

Given I searched by using Advanced search
AND I hit Reset all on the Search & Filter pane
WHEN I hit Advanced search
Then the modal should be reset to default value with no queries

Given I searched by using Advanced search
AND I hit the "X" in the search box under the Search & Filter pane
WHEN I hit Advanced search
Then the modal should be reset to default value with no queries

Environment

None

Potential Workaround

None

Attachments

2

Checklist

hide

TestRail: Results

Activity

Show:
Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Lotus R1 2022

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created January 18, 2022 at 5:10 PM
Updated February 11, 2022 at 9:26 PM
Resolved January 27, 2022 at 8:55 AM
TestRail: Cases
TestRail: Runs