Closed belljustin closed 8 years ago
Just the last word in the query, so, remove the word 'old' here to get an example of what I meant.
"I live on s" -> I live on Sherbrooke -> I live on SunnyRoad -> I live on Saturn
I moved this on to dev. Some notes for ya:
Of these, I think only the first two are really critical. The other two are just nice (if you have the time and desire to do them).
Edits @belljustin: checkboxes ✅
I'm wondering about what the best back end suggestions could be like. The way I asked Justin to implement it, solr just suggests words based on what you've half-typed not taking the context of the other words you've typed into the field.
We could potentially do better than this. One option (which I've been exploring locally) is to copy all the labels into a suggestion field. Then, when you search for 'the psalmist', it can suggest the title of a work that contains 'the psalmist', instead of suggesting that perhaps you want 'the psalmists'.
{
suggestions: [
"the psalmist : a collection of psalm and hymn tunes, arranged for the organ or piano forte"
]
}
The problems with this is that it assumes that people will be primarily searching for labels/titles (we won't get suggestions on other fields). Also, some providers abuse the label field and put ridiculously long labels in - this would bork up the suggestions.
It's possible to have two 'active' suggestions if the mouse and keyboard are used.
Pressing enter does nothing?
Two more requests:
if user_clicked_suggestion and search_results.count == 1:
load_into_diva(search_results.docs[0])
That is, if they click a suggestion and exactly one thing comes back, load that thing.
TODO:
Query suggestions are added to a dropdown on the search input