Facet Search not working on my local but working on our development environment
I have an issue where conducting a search on a custom facet the results are displayed correctly on my development machine but these same searches are not working on my local machine:
For example I have a custom facet called 'Department' which displays 'Accounts Receivable', 'Asset Management' etc on the facet search I enter the word 'Asset' and the results are displayed inside the facet search box on my development machine.
Doing the same search on my local the search box icon does a quick spin and then the search box is displayed in pink.
I have another facet for a separate page that uses the template field as the facet '@fz95xtemplatenameXXXXX' the facet search works fine in both my local and development machines.
My local machine is a single sitecore environment, the development machine has a CM and CD environment for Sitecore.
The following are the areas I have checked to find the source of why my local facet searches are not working:
- Checked the Coveo configs and compared the differences all appear to be the same except for the location fields etc
- I am using the default 'facet-view.cshtml' file and both are the same on my local and development machines
- I have checked the index on my local and the index field in the query (opened console in the browser dev tools) appear to be ok, no errors in the console just zero results returned.
- Both environments have the same code base
I'm very confused as to why my local facet search would not display the results but my development machine would?
Any suggestions or insights greatly appreciated thank you.
You should check and compare the request made from the browser when you do a facet search in both environments. Put both in a comparison tool and look for differences.
If I remember correctly, facet search will only work when the field used in the facet is set as a "Facet" field in Coveo Enterprise Search (CES). I see you are using Coveo for Sitecore. The fields options in Coveo for Sitecore are defined on XML elements of the field map located in the
Coveo.SearchProvider.config file. Even if the file is the same on your development and your local machines doesn't mean your CES index is correctly configured nor that your indexed documents are containing the right information for this facet field.
The configuration between Coveo for Sitecore and CES is done at the beginning of each indexing operation.
The CES index is also building a facet data structure for each facet field at indexing time.
For those two reasons, when a facet field is added to the configuration, a rebuild of the Sitecore search indexes is needed to synchronize the configuration and re-index every document to update their field values for CES to build the facet data structure.
CES is able to build its facet data structure without rebuilding the indexed documents but it takes a longer time as it does the work in background while it is idling.
So I recommend you to do a rebuild of your Sitecore indexes managed by Coveo first.