Support phrase search with double quotes in Inventory & MARC authority apps
Description
Environment
Potential Workaround
CSP Request Details
CSP Rejection Details
CSP Approved
Attachments
is blocked by
is cloned by
Checklist
hideTestRail: Results
Activity

Christine Schultz-Richert June 4, 2024 at 8:07 PMEdited
Updates to requirements/added to description: Exact phrase should be agnostic to diacritics
Question for refinement related to Keyword exact phrase with terms outside of quotes: Once we are able to support exact phrase in the advanced search modal as well, the ability to search these terms within all fields in the Keyword is supported in the Advanced search modal. If we did not make the change to the basic Keyword search, but we do support the exact phrase search, what would happen with the terms outside of the quotes? Would it only be able to find the matches that exist in a single field?

Christine Schultz-Richert May 30, 2024 at 11:46 AMEdited
Refinement 5/30/24:
Implement without impacting different language analyzers to test performance and expectations
Documentation:
-
for Keyword search, what are the expectations? Should the search include all fields? Meaning, can the query appear in any of the fields including keyword?
“climate change” Africa: Should it be able to match on a record that has “climate change” in the title, but “Africa” in the contributors?
Should exact phrase honor diacritics?

Christine Schultz-Richert May 9, 2024 at 12:44 PM
Refinement 5/9/24: to ask community if there are any libraries setting up different analyzers for different languages (asked in Slack 5/9/24)

Valery_Pilko May 8, 2024 at 4:38 PM
Hi
FYI: Currently, we use “==/string
" operator for “Subject” search option, looks like according to this story it should be changed to another operator.

Khalilah Gambrell August 17, 2023 at 11:50 AM
8/17 Refinement notes: to review. Setting back to Draft.
Details
Details
Assignee
Reporter

Overview: There is a need to support phrase searching so that users can conduct a more precise search when retrieving records in Inventory and MARC authority apps. Phrase search is explained here - https://github.com/folio-org/mod-search#cql-query-operators
Requirements
When users input terms within double quotes while conducting a search in Inventory or MARC authority app, match against titles using an exact match, in the exact order (match phrase query) (Scenarios 1 &2, 7 for no quotes)
No fuzzy logic or word stemming; "Global" should not match to "Globalization" (Scenario 4)
No additional positions allowed between terms in the phrase for a match (Scenario 5)
Terms outside of the quotes should all also be found in the title, but not necessarily in the same order and may have additional words in between
Exact phrase should be agnostic to diacritics
Searches should NOT be case sensitive
Full-text usage
Inventory - current search options via UI
||Instances||Holdings||Items||
|Keyword|Keyword|Keyword|
|Title (all)|Holdings notes (all)|Item notes (all)|
|Contributors|Holdings administrative notes|Item administrative notes|
|Subject| |Circulation notes|
|Instance notes (all)| | |
|Instance administrative notes| | |
MARC authority - current search options via UI: All fields except for Identifier (all)
Scenarios - see wiki page for more detailed scenarios
Scenario 1
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for "Global Africa" (containing the quotes)
Then results should return Instances with titles that contain "Global Africa" in that order
Scenario 2
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for "Global Africa" (containing the quotes)
Then results should NOT return Instances with titles that only contain "Africa Global"
Scenario 3
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for "Global Africa" (containing the quotes)
Then results should NOT return Instances that do not have titles that contain "Global Africa" in that order
Scenario 4
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for "Global Africa" (containing the quotes)
Then results should NOT return Instances that only have "Globalized Africa" in the title (and not the word "Global")
Scenario 5
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for "Global Africa" (containing the quotes)
Then results should NOT return instances that have both "Global" and "Africa" but with other terms in between
Scenario 6
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for - "Global Africa" the book - (containing the quotes, not containing the hyphens)
Then results should return Instances that have:
"Global Africa" in that order, with no words in between
"the" and "book" somewhere in the title, not necessarily in that order and with any words in between
Scenario 7
Given a user is in Inventory and performing a Title (all) search
When a user enters a search for Global Africa ("Global Africa" without the quotes)
Then the results should contain titles that have BOTH "Global" AND "Africa" in the title, not necessarily in that order, and allowing additional terms in between