HTML5 Data Bindings Support Product Page

Answered

How to build a search which can combine multiple things from different fields at the same time?

Asked 28 Mar 2014 22:10:00
2
have this question
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?

Replies

Replied 29 Mar 2014 00:50:49
29 Mar 2014 00:50:49 Steve Skinner replied:
Just a quick addition...

On searching a single field, I was tinkering and discovered that if I add a second search field (searching the same field) and use the AND operator, I can start get closer to the kind of search I need - a search that delivers results that contain all the words you've given it, even if it's not the exact phrase structure. The thing is - I need to be able to do this within a single text box like search tools you use everyday.

Hopefully DMXzone or someone can else can help.
Replied 31 Mar 2014 08:17:20
31 Mar 2014 08:17:20 Teodor Kuduschiev replied:
Hello Steve,
It is not very clear what exactly do you need to achieve. Which of the following is your goal:
- Search multiple terms in a single database field, without matching the exact query, like searching "planet Jupiter" will find these in the following text - "Jupiter is the fifth planet from the Sun and the largest planet in the Solar System."
- Searching multiple terms in multiple database fields like searching the same "planet jupiter" in such a database table
[ID] [Astronomical Object] [Name] [Distance...]
[12] [ Planet ] [Jupiter]......
Replied 31 Mar 2014 14:14:27
31 Mar 2014 14:14:27 Steve Skinner replied:
Both actually, because that's how most of the other search tools I've had built for my customers work. A full text search allows you to locate exact and partial matches, across multiple database fields. Here's an example of this sort of search from one of my customer sites:
www.dyeableshoestore.com/store/search_results.asp?StoreID=0&searchtext=ballet+satin+bow&searchbox=SEARCH

The search term "ballet satin bow" returns results where these terms are found in various database fields. Take the Ballet 180 shoe for example. The terms "ballet" and satin" are both in the product name field, but the "bow" term is in a keywords field that is used in the search but not displayed on the page. Similarly, a search for "white satin" will give you results that include both exact matches as well as matches that just contain both words but not exact. You can continue to add more and more words to hone in on the products you're looking for. It's very powerful and we've had a lot of good customer feedback on the usability of this site's search (it's a very busy site).

I could pay one of my programmers to customize the code to do it, but where's the fun in that? :-) Plus, once the code is customized, I can no longer modify the HTML5 Data Bindings in Dreamweaver. The HTML5 DB integration with Dreamweaver is awesome, and I would love to be able to have this kind of advanced search capability.
Replied 03 Apr 2014 08:50:55
03 Apr 2014 08:50:55 Teodor Kuduschiev replied:
Hello,
Unfortunately such a complex search functionality is not integrated in the Data Bindings extension. The search option that can be used for searching in multiple DB fields is to use "contains".
I will check with the developers if complex search options can be integrated in the future updates of the extension or as an additional extension.
Replied 04 Apr 2014 17:24:00
04 Apr 2014 17:24:00 Steve Skinner replied:
I guess in the mean time then, I'll settle for settle for what I originally planned - and have my programmers modify the code generated by the extension to get the search features I need.

Reply to this topic