UV 11.3.1
flavor PICK (for SB+ in some places in the foundation)
Goal: Do at least a slight improvement on a search feature
Existing simple search feature:
Currently, a web front-end gathers a single string from a user and then searches for each separate word (space-delimited) in that string across 5 fields in the database, including a "title" and a "short title."
Result:
User types in a phrase, and a lot of entries show up before one that has that exact phrase in one of the title fields. The most obvious choices do not come up first.
E.G.
User types in
Better Eating through Chemistry
Resultset could be something like:
Chemistry 101
Eating Well
Better Political Situation in the MIddle East
...and 2 pages later
Better Eating through Chemistry
...before 3 more pages
I would like to do better than a simple search, without getting into any of the following:
1) front-end selects or sorts
2) add-ins
3) anything that changes what the user enters -- needs to be a response to a Search where they enter a string of what they are looking for
4) anything that detracts too significantly from the performance (it is OK if it is a bit slower, but needs to be a good user experience)
I would like to improve this search, possibly by showing multiple result sets:
Result set #1
Match the set of words entered to any items with one of the fields being matched having all of these words in the same order, but not necessarily adjacent. So a search of Better Chemistry would bring back anything with "Better Chemistry" in it but also "Better Eating through Chemistry" but would not bring back "Why Studying Chemistry is Better than Physics"
Result set #2
DONE. Simple enough to match for all of the tokens with "and" instead of "or" in our current query
Result set #3
DONE. The current query with results where any of the fields being searched have any word matching any token
Any suggestions on how to accomplish Result set #1 with a query and/or basic statements? (I'm green) Are there other ideas for how to improve a simple search so that it is a tad bit better and would show the "Better Eating through Chemistry" item up front if that is what the user enters? For example, I could switch the idea for result set #1 to just find exact matches of the full string within each field, but I was trying to do better than that.
Thanks in advance for any ideas or even query statements or BASIC code for this. --Dawn