Closed mnl101 closed 4 years ago
As it turns out, this is a shortcoming in MySQL. It doesn't understand exact phrase matching in a full-text index. So I hacked a bit of a solution for now. The fix should be up and running by the end of the day.
And exact phrase search will work provided that
Thanks Michael, this sounds good. Thanks for finding a hack. What should we do for searching something like “A. James”? Just leave out the period, ie “A James”?
On Jun 17, 2020, at 12:56 PM, Michael Joyce notifications@github.com wrote:
As it turns out, this is a shortcoming in MySQL. It doesn't understand exact phrase matching in a full-text index. So I hacked a bit of a solution for now. The fix should be up and running by the end of the day.
And exact phrase search will work provided that
The phrase starts and ends with double quotes. Single quotes won't work. The phrase only contains letters, numbers, and spaces. Punctuation will break it. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sfu-dhil/wphp/issues/140#issuecomment-645590548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6PYGQQ32MZ76T6NUG3HM3RXENX5ANCNFSM4NZZ3SXQ.
Leaving out the period won't work, and including the period will cause trouble. So I need to rethink how this works a bit. Still should be done today though.
The simple text fields in Title are now searchable like this, and searching for "A. James" (with the quotes) should work as expected. I haven't made any changes to the person or firm search.
Describe the bug: When we search for exact phrases using Boolean searching (for example, “by a lady”) in any open text field it filters out the filler words or stop words and returns search results for only the non-filler words in the phrase. We’ve noticed this issue in searching for the signed author field in the advanced title search, searching the imprint field in the advanced title search, and searching for titles in the basic title search.
To reproduce: Click on “Search” in the top menu, and select “Titles” in the drop down menu. Click on “Advanced search.” Scroll down to the “Signed author” field. Type in “by a lady” (with quotations). Scroll down and click “search.”
Additional context: This feature is important for when we or other users are searching for specific titles, specific people who sign their first names with just an initial (ie. “A. James”), or specific phrases that anonymous authors used to sign their names (ie. “by a young lady”).