From my testing, it does it by default. So I followed this page: developers.coveo.com/display/SitecoreV4/Provide+Result+Suggestions and I added the "Coveo Search Resources", "Coveo Search Box" and "Coveo Omnibox Result List" to my header. I now have suggestions on everything within my index.
Side Note : The suggestions, when clicked, will open the result itself, it will not redirect me to the search page.
I tested just typing "ar" and it suggested Article , Article Group, Glossary and more.
Is it what you are seeing?
* UPDATE *
I made a mistake in my original answer, I was using field-based query suggestions : https://developers.coveo.com/display/SitecoreV4/Provide+Query+Suggestions
To have the same query completion behavior with the OmniboxResultList (Results Suggestions) is not possible without adding a wildcard, since it does a full query against the index, while query suggestions does a field listing call: https://developers.coveo.com/display/SearchREST/Listing+Values+of+a+Field
So is there a workaround? Yes!
BE WARNED! This workaround will require you to map the title of your items as a facet. Facets require more computing than standard fields, so a facet with a high number of values is not recommended for large index. If you use this workaround for a few hundreds/thousands items, fine, but not for millions.
The way it work on our pages such as the online help is by doing a field-based query with a custom onSelect event, which looks like this:
$('#searchBox').coveo('initSearchbox', MySearchBoxComponent, {
FieldSuggestions: {
omniboxSuggestionOptions: {
onSelect: function (valueSelected, populateOmniBoxEventArgs) {
populateOmniBoxEventArgs.closeOmnibox();
// When a value is selected, query the index for the result list
Coveo.SearchEndpoint.endpoints["default"]
.search({
q: '@systitle=="' + valueSelected + '"',
aq: SuggestionScope
})
.done(function (results) {
var foundResult = Coveo._.find(results.results, function(result){
return valueSelected == result.raw.systitle;
});
if(foundResult) {
logCustomEvent('pageNav', 'omniboxTitleSuggestion', uaToken, foundResult.Title, foundResult.clickUri);
window.location = foundResult.clickUri;
} else {
logger.warn("Selected suggested result," + valueSelected + " , not found.");
}
})
},
queryOverride: SuggestionScope
}
}
});
* UPDATE 2 *
My original code was using the Coveo JavaScript framework standalone, here is the new code in Coveo for Sitecore using MVC
Coveo.$(function () {
var searchbox = Coveo.$('#@Model.SearchboxId');
if (typeof(CoveoForSitecore) !== 'undefined') {
CoveoForSitecore.componentsOptions = @(Html.Raw(Model.GetJavaScriptInitializationOptions()));
//Here is the part where I access the suggestions of my search box
CoveoForSitecore.componentsOptions.FieldsSuggestions = {
omniboxSuggestionOptions: {
//This queryOverride is optional, you can use it to filter the suggestions
queryOverride: '@Model.ToCoveoFieldName("haslayout")=="1"',
//The onSelect function is the one we want to override in order to open the suggestion
onSelect: function (valueSelected, populateOmniBoxEventArgs) {
populateOmniBoxEventArgs.closeOmnibox();
//This is the core of the code, you will launch a new query to find the value selected in the suggestion and open it directly
Coveo.SearchEndpoint.endpoints["default"]
.search({
q: '@Model.ToCoveoFieldName("title")' + '=="' + valueSelected + '"'
})
.done(function (results) {
var foundResult = Coveo._.find(results.results, function(result){
return valueSelected == result.raw.systitle;
});
if(foundResult) {
// This logCustomEvent is optional but should be used in order to track in the Usage Analytics
logCustomEvent('enter the name of the event');
window.location = foundResult.clickUri;
} else {
logger.warn("Selected suggested result," + valueSelected + " , not found.");
}
})
}
}
}
searchbox.coveoForSitecore('initSearchbox', CoveoForSitecore.componentsOptions);
} else {
searchbox.coveo('initSearchbox',
'@Model.GetSearchPageUrl()');
}
searchbox.find(".CoveoSearchbox input").attr("placeholder", '@Model.SearchboxPlaceholderText');
So what it does is offering query suggestions, but instead of redirecting to the result page, it queries the index and redirects to the most relevant result.
For more information on the PopulateOmnibox function: https://developers.coveo.com/display/JsSearchV1/Providing+Suggestions+for+the+Omnibox