2. • Quick Intro to Coveo
• Problem Solving
• DebuggingTools
3. • Coveo for Sitecore is an integration to Coveo’s full fledged search engine
• It is accessible directly in Sitecore’s control panel
• It enables control over what gets indexed and how
• Allows for building Coveo based search views out of the box
• Interested to learn more?Visit their website and documentation
AQuick Intro
5. • Definitely don’t want content author entering these fields multiple times
to avoid excessive duplication in parent/child relationships
• Don’t want to load these relationships on client side as well (which would
be expensive)
• Answer: Computed Fields and MultiValued Computed Fields
Battlethe HierarchicalData
7. • We have seen how computed fields and multi-value fields could serve lot of
complex use-cases
• A typical facet slider would work on only one field either traditional sitecore or
computed field which is of type number/integer
• Our requirement is unique per Coveo team where we need a slider that spans
across two fields on the same template (multi-valued number field)
• Solution –Think outside of what Coveo provides OOTB
MultiValuedNumber Field– FacetSlider
8. • Facet Slider auto generates minimum and maximum, but, we can choose to turn this
off.
• We have custom logic that computes minimum and maximum and assigns it to the
facet slider component on the coveo search view on afterComponentsInitialization
event
• Next, we need to instruct Coveo Facet Slider to cater to more than one field when the
values are changed
• To do this, first we add a Facet Slider based on one of the fields of our interest on the
template– say Maximum Neighborhood Price and then use advanced expressions to
mimic the second filter
Solution
10. • Basic sorting on a field in a Coveo Rendering or SearchView on
Sitecore Field
• Sorting inTabbed Results
• Using Javascript instead of rendering properties
• Custom Sorting
CoveoSortingOptions
11. Most simple type of sorting
First – decide on the Sitecore field you want to sort the results on
• Note – Not all Coveo fields are sortable, for example a string field is not by default
• If the field is not sortable – Make it sortable by simple configuration changes
Define three simple fields available on rendering and you are good to go
• Default SortType
• Default Direction
• Default Sort Field - (Workaround on few versions of Coveo– use GUID instead of
search box pick)
You are done!!!
BasicSitecoreFieldSorting–Coveo Rendering
12. Crucial Step – Need to add a Coveo Sort Component to the presentation with same
settings as your default picks for sorting on SearchView rendering.
• You are done!!!
TabResultsSorting
13. Another way of doing what we did
Options are always good.
• You are done!!!
JavaScriptSorting
14. Not frequently used as others
Will need this option if the default behavior is not working for your specific use case
Caution against using it if your field is auto computed from a Sitecore field that is
content authored or is not a definitive set of values
Use of special attribute on the sort view – “data-custom-sort”
Example Scenario – Say you don’t like the way Coveo groups selected values on the
top when selected values are chosen via URL. Simply override it using custom sort.
CustomSorting
16. • Often forgotten or ignored. Will come back and haunt post live.
• Scenarios –You have computed fields which inherit data in from parent or child of a
particular item
• You need to explicitly tell Coveo that you wish to re-index ancestor or child of an item
when an item falls in the delta of items to be indexed when indexing process of Coveo
is triggered. A workflow specific approval on an item?
• Easy to do so, patch to “CoveoItemProcessingPipeline” and implement process
method to force Coveo to do something extra.
• Add additional items you need to “outputitems” collection
• Add this new processor to yourCustom Coveo configuration file
• Test this thoroughly and ensure nothing that you did not expect do not get added and
re-indexed.
How to tellCoveo what to Index
18. • Scenarios - I am on the same custom coveo view and on another portion on the view
or for internal logic I need the same query to run, but, with subtle changes/additional
query parameters.
• Could run in to this situation quite often. Say, you have a component on your view
that need to parse over the whole result set, not just paged results that Coveo returns
on the match?
• Look in to Related Query Component if you want this little piece visible on your UI
• On the other side, you want this for internal computation only, then try this
Whatif I wantdifferentfilterson samequery?
21. • If your project uses plain old Coveo renderings and does not use Coveo Indexes from
Sitecore content search, you can choose to add another IIS site on CD server and
point that to the same site. Use this URL (internally open and no auth) to manage
yourCoveo indexes.
• If your project accesses Coveo indexes from code and content search - #1 will not
work work and will cause 500 (Coveo rest end to pull index will error due to 401 again).
In this case, you have two options:
• Disable IIS basic auth and use IP whitelisting for security instead, if your infrastructure
thinks this is a possibility.
• Keep IIS Authentication enabled on all folders of the Sitecore instance except
WebsiteCoveorest.
What are my options?
Like any other third party tool – this is not one shop stop for all projects that you might have. It has to picked based on business needs and should be tailored accordingly.
Like any other third party tool – this is not one shop stop for all projects that you might have. It has to picked based on business needs and should be tailored accordingly.
If you missed any of that, there’s an accompanying blog post, summarising our 8 tips to writing a winning Experience Award submission, in the link below this video.
Best of luck to all our 2016 Sitecore Experience Award entrants—and remember, the deadline for submissions is January 31, 2017, so get started on your submission today!
Good luck!