-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
… search terms from search.gov and fuse.js.
Thoughts:
An observation: I will say that when you search for something like "Church" the first three options have no results. I don't feel like that is getting any closer to a good solution than what we have now. |
@maomeara63 Dan and I were discussing building out a curated list instead of extract from search.gov search queries, which is what is populating now with misspellings, etc. We can discuss how we might want to tackle that. |
fyi the current sort order is based on a calculation of string distance - basically terms that share the largest number of characters with the query are first. An alternate way to do it is only show terms that start with the characters in the input box (Google does this), but we would need many terms to seed the suggestions with. |
@danielnaa Meghan, Kim and I discussed. We like the idea of the "google" approach of suggesting words. Attached is a cleaned list of words found in search.gov queries. It excludes helper words such as prepositions, articles, pronouns, etc. It is just terms, though, not phrases, so not sure if that is helpful or not. |
I moved the search terms into a standalone JSON file - https://github.com/18F/cv_faq/blob/search-term-suggestions/suggestions.json Would everyone be comfortable making edits to this file? It's currently alphabetized, but the order doesn't matter. There's also test coverage that verifies that it's a valid JSON-formatted file, so there should be no worries about making syntax errors. |
Cleaned up spelling, removed duplicates and junk entries.
@danielnaab Meghan and I just reviewed the json. Making edits to it looks very manageable. We also looked at how the type ahead is working using the json which also looks good! Made multiple updates to the file this afternoon. |
Questions for Dan
|
…the suggestion template. (This works around a bug in accessible-autocomplete)
…sage of the suggestion template. (This works around a bug in accessible-autocomplete)" This reverts commit 21d1368.
…arch results. NOTE: This was initially tried in response to "anxiety" matching the term "can i get".
87bfb98
to
80020ee
Compare
@debjudy I removed the input pre-filling, added in the exact search term into the suggestions drop down, and tweaked a search parameter that addresses the "anxiety" match. I think the latter change should be safe, but may want to test a bit to confirm other terms still have good suggestions. |
@danielnaab Thanks! @kimschulke @maomeara63 @jonadecker would you please do some testing on the search suggestions and let us know what you think. |
…s, and use those counts to filter which keywords are displayed as suggestions.
@danielnaab From testing this morning
|
I pushed something up to add in routed queries. WRT the search.gov count bug - there's a workaround I could look into adding in to get such ones removed from the suggestion list. WRT the Fuse.js "st" search behavior - I think we'll have to live with that - the library doesn't provide a way to prioritize "starts with" queries without compromising its fuzzy search behavior. |
…array size in certain circumstances.
added 80 new terms based upon last 3 weeks of terms searched which yield results.
Update raw list based upon searches from last 3 weeks.
Still/again(?) seeing the "air conditioning" query weirdness Deb described above @danielnaab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This branch implements a term suggestion drop-down, using a hardcoded list of search terms from search.gov and fuse.js. See #881
There are now three suggestions files:
suggestions-raw.json
- The curated source list. Only make edits to this filesuggestions-counts.json
- Includes search.gov results counts for each keyword suggestion insuggestions-raw.json
suggestions.json
- Final list of filtered suggestions; currently, keywords with less that 2 search results are omitted.Please confirm the following steps are completed:
preview
(approved content) <- Content branchmaster
(production) <-preview
preview
(approved content)😎 PREVIEW URL