Two search boxes and two result lists

Aug 14, 2008 at 1:44 PM

Is it possible to have two search boxes and two result lists on the same page, where one search box and one result list is connected to one view and the other search box and result list are connected to another view. I've seen that you can change the Search Group ID for the result list but how do you associate a search box with a result list. I haven't seen any Search Group property for the search box.

Best Regards,
Aug 15, 2008 at 1:59 AM
Hi Tommi,

You can add multiple result lists to a page and have each result list configured for a different view or even a different ESP instance. By default, each time a query is submitted it will be processed against all results list web parts on the page, regardless of the search group setting.

You're correct that the search box web part doesn't use the search group parameter. Instead, the search box steers queries by passing the search string into a URL parameter. By default, the search box web part sets the URL parameter "k" and by default all web parts use the parameter "k" as the search query input. In theory you could configure a another URL parmeter to be used for the search query input, but this would require that you deploy a web part to set this parameter. In any case, you might consider whether having two separate input boxes on the same page is really the design your're looking for -- perhaps you'd do better with one input box and a pick list for steering the steering the query to various instances/collections/views.

Hope this helps.

Aug 15, 2008 at 9:21 AM
Hi Land,

Thanks for the input. The approach with only one search box might be the way to go. How do I configure this solution? I obviosly have one search box, a drop down list or radio buttons where the user selects the view to search and one result list that present the results. But what properties do I have to set?

Best Regards,
Aug 26, 2008 at 11:55 AM
Hi Tommi

Sorry it took so long for a replay. Was really busy and didn't find the time to follow this one up.

If you for example have 1 search box and you want to have two different result lists wich go to different sources/views you can just place the two result lists onto the page.
In the first reult list, in "Web Part Properties", you change the view and location as desired.

In the second result list, in "Web Part Properties", you select "Group1 under "Advanced Search configuration" and press apply.
Then change the server and view under "Search Configuration" to the esp instance you want to have. (Can be another one ten the first one)

Now when you search, both result lists will do a search as defined in the list.

If you now in addition want to add other webparts like pagination, summary or navigators, you can just specify in which search group they shall work.

For example add two pagination webparts where one works for Group0 and one for Group1 so you have paging for both result list.
Same applied to all other FAST specific webparts.

Hope that helps.