28 Mar 2014 22:10:00 Steve Skinner posted:
Building a very basic search is really easy with the HTML5 data bindings, and that covers the needs of about half the time where I would need to use it. The other half requires more advanced search capabilities, such as multiple word queries which search multiple database fields and deliver matches where the words in the query are found but not necessarily an exact pattern match.
Using your own tutorial as an example:youtu.be/Q9frFNnaLxw
This tutorial very effectively shows you how to build a search using a single search field, and returns results where the search match can be in one of many fields. However, the problems begin when you use more than one word. The search results using "contains" still yields exact matches only when using more than one work. For instance, the search for "harley" yields 3 results, but you would get 0 results if you entered "Harley Eagle" because it's looking for an exact pattern match, even though there is a result that does contain both of those worlds. Exact pattern match searches are almost entirely useless in the real world of ecommerce sites or knowledgebases.
Can you provide any tips on creating a search that works with multiple fields in the same way, but will return results with relevant hits when you use multiple words in the search - and that don't have to be an exact pattern match?