flexion / ef-cms

An Electronic Filing / Case Management System.
23 stars 10 forks source link

Order Search: Locate document by exact keyword/phrase #8546

Closed mariahkannenberg closed 3 years ago

mariahkannenberg commented 3 years ago

As a court employee, in order to locate documents with specific keywords or phrases, I need to be able to retrieve documents with only those exact keyword/phrases

Pre-Conditions

Acceptance Criteria

Mobile Design/Considerations

IRS API Considerations

Do these changes impact the IRS API?

Security Considerations

Notes

Tasks

Definition of Done (Updated 4-14-21)

Product Owner

UX

Engineering

kkoskelin commented 3 years ago

For discussion between engineers & design: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

kkoskelin commented 3 years ago

I don't know if it's captured in any search-related stories, but we have heard users ask whether or not their existing search results were getting further narrowed, e.g. applying more filters to a special set of search results already produced for them.

This is most definitely not the case, and I think we should do what we can to not give this impression. In a few places the words "Narrow your search" is used. Perhaps what we should do is replace them with suggestions to search again with additional criteria.

kkoskelin commented 3 years ago

Preliminary work to support searching for exact phrases can be found in the branch 8546-exact-phrase-search. Searching for exact phrases can be accomplished simply by enclosing them in double-quotes within the search field.

klohman commented 3 years ago

Order search tab

image.png

image.png

keywords contained in quotes “[keyword keyword]” indicates exact match search

Considerations: Stopwords how do we handle stopwords? Is it possible to keep them when part of a phrase? https://www.elastic.co/guide/en/elasticsearch/guide/master/stopwords-phrases.html#_stopwords Special characters - results Case sensitive - matches should not be case sensitive

Mobile

image.png

klohman commented 3 years ago

Test cases

expected results results include all keywords in exact order results do not include documents with keywords not in exact order exact match found in document title and contents exact match found in document title but not document contents exact match found in document contents but not document title exact matches with stopwords exact matches with special characters * moving this to a separate story exact matches with lowercase/uppercase characters (should not be case sensitive)

Data Order 1 “welcome to flavortown” in document contents + title

Order 2 “welcome to flavortown” in document contents

Order 3 “welcome to flavortown” in document title

Order 4 “welcome to something” and “flavortown” in document title

Order 5 “welcome from flavortown” in document contents + title

Order 6 “welcome to flavor-town” in document contents + title

Order 7 “welcome to flavortown.” in document contents

  1. Search for “welcome to flavortown” expected results

    • [x] Order 1 returns in results
    • [x] Order 2 returns in results
    • [x] Order 3 returns in results
    • [x] Order 7 returns in results
    • [x] Order 4, 5, 6 do not return in results
  2. Search for “welcome from flavortown” expected results

    • [x] Order 5 returns in results
    • [x] Order 1, 2, 3, 4, 6 do not return in results
  3. Search for “welcome to flavor-town” expected results

    • [x] Order 6 returns in results
    • [x] Order 1, 2, 3, 4, 5 do not return in results
  4. Search for “Welcome to Flavortown” expected results

    • [x] Order 1 returns in results
    • [x] Order 2 returns in results
    • [x] Order 3 returns in results
    • [x] Order 7 returns in results
    • [x] Order 4, 5, 6 do not return in results
  5. Search for “welcomes to flavortown” No orders return in results

Realistic data examples for larger testing

klohman commented 3 years ago

UX review: Searches with special characters are not working 100%

example:

This should be addressed in the story handling special characters.

cholly75 commented 3 years ago

Search checkout returned good results when checking exact match vs. non-exact, including filters!

Two things:

1) UI for the search fields display incorrectly on my browser UI:

image.png

2) It appears that the Caption+Docket# on the order is indexed as content when the document is a legacy PDF or has been scanned/uploaded to DAWSON, but it is not indexed if the document is DAWSON-generated content? Ex. docket #9261-17; search term 'consolidated'. Is this expected behavior, and is there a way to make this consistent across all orders in either direction?

matthopson commented 3 years ago

This is on mig, but is awaiting a re-index to test.