Gravatar for

Question by dave tobin, Mar 6, 2015 4:32 PM

Omnibox not displaying results in latest version of JSUI (works on older version)

Summary: I have "installed" the latest version of the JavaScript Search framework (downloaded today), and it looks as though the omnibox feature is not working properly. I initially noticed this while pointing to my on premise endpoint, so I started over with a fresh install of the JS framework. Even without modification, and using the sample endpoint, the omnibox is not displaying when values match the facets in the page.

Note: the search interface is returning results and facets are limiting those results, so the interface is talking to the endpoint.

I have an older version of the JSUI working (from October 2014) on the same server, and the omnibox is working fine.

Steps to reproduce

1) load all.html 2) start typing in the search box

Expected results: the omnibox displays facet values grouped by facet Actual Results: no omnibox results appear.

1 Reply
Gravatar for

Answer by olamothe, Mar 6, 2015 4:49 PM

Facet can be included or excluded from the omnibox with an option. In a recent version, we decided to change the default value of this option to false, mainly for performance reasons (as it comes at a cost in the index to search facet with lots of values, very often).

To set the option on a particular facet, you can add data-include-in-omnibox="true" on the html tag of that facet
If you want to set this option globally for all facet, you can do it during the 'init' call

$('#search').coveo('init', { Facet : { includeInOmniBox : true } })

Gravatar for

Comment by dave tobin, Mar 9, 2015 3:32 PM

Thanks for the response. I made the adjustment, and both methods work for the Coveo sample endpoint, but not for our on-premise endpoint. The search interface is getting results with our on-premise endpoint, but the omnibox is not populating at all. It works completely as expected for the sample endpoint.

Any thoughts? Again, this is working with our on premise endpoint using the older JS framework.

One notable item from our setup is that we are using the API exposed by the .NET interface, instead of the standalone rest API. Could that have something to do with it?

Gravatar for

Comment by olamothe, Mar 9, 2015 3:58 PM

Yes, it's most probably why it's not working correctly. When you try to search directly in the search box of each facet, does it work ? It's the same REST call that both are using.

I would suggest if it's possible to also upgrade the REST API to the newest standalone version available, as it might not be the only problem that you run into. The old API exposed by the .NET interface is deprecated and does not support any new features.

Gravatar for

Comment by olamothe, Mar 9, 2015 4:01 PM

If it's really not possible to upgrade, we added a flag when configuring the endpoint : isOldRestAPI.

Coveo.Rest.SearchEndpoint.endpoints["default"] = new Coveo.Rest.SearchEndpoint({ restUri: 'http://server:8080/Coveo/Rest', isOldRestAPI : true });

This could help in your case, but as I explained in my other comment, other features might not work properly down the line.

Gravatar for

Comment by dave tobin, Mar 12, 2015 1:26 PM

Understood. Thank you.

I made the change in the endpoint code, and everything is now working. We are only running .NET for a short period of time, as we do a soft launch of the JSUI, so we'll switch over to the dedicated Rest API in the near term.

Thank you.

Ask a question