Multiple Swiftype search boxes - different behaviour


#1

Is it possible to have 2 search inputs on a single page where one have autocomplete enabled and the other doesn’t?

Ideally without having to write my own customisation :smiley:


#2

I would like to know the answer to this question, as well.


#3

Using the Swiftype Jquery implementation, this is very easy - you can enable autocomplete selectively on each search box field. The Jquery API is only a few lines of code more than the embedable code they provide on the website and markedly more flexible in what you can do with it.


#4

Chad we have two search engines (one at the site level, the other at the directory level, say /abc/) configured mapping to search field etc. The site level search field is at the header whereas the directory level search field is in the body. Both site level and directory level search will need to work for the pages under /abc/. How can this be implemented?


#5

It’s basically the same answer. Using the Jquery API from Swiftype you can add two search boxes to the same page. Each one has an Engine ID - so you can point one to one engine and the other to the other engine.


#6

Chad, the ‘install search’ script has been included, for both the searches, in the pages at the directory level, still only one search works. The _st(‘install’,,‘2.0.0’); has been included in all pages and the pages with two search fields this has been added twice.
In addition I would like to mention that we would like to carry out the configuration using swiftype admin tool and avoid any programmatic approach.


#7

@chad.johnson I have successfully implemented this (two searches on one page, connected to different engines) but the issue I am having is that results from one search are showing up in the second search results box elsewhere on the page. I believe its because of the code that get appended to the url e.g. “#stq=test&stp=1”.

Is there any known solution for this issue?


#8

Also running into this problem.

What’s striking is that the ajax response of the search results is available. It seems that it just isn’t appended to the page.