Saturday, November 19, 2016

New Items not Indexed on Coveo

New Items Not Showing Up on Coveo Indexes


You have set up everything alright.  All Coveo components are green, your search renderings show up fine on UI.  All is set! You are a rock star. 

You notice something really wierd, updates on sitecore content items show up fine on Coveo Indexes, but, new items added are not showing up on Indexes until you manually rebuild them using Indexing manager. Well, this is a problem we can not live with as we can not ask Content authors to actually rebuild indexes everytime they add a new item.  Bad solution!

Have to resolve this for sure, there is no option. 

Below are the check points I made - 
1. Check the logs for errors
2. Ensure on showconfig.aspx, Coveo index sync strategies are set up fine OOTB one's are perfect in most cases. 
3. Check CES console for any errors
4.  No luck so far, everything looks perfect. 
5. Next resort was CES Admin Tool, I  used localhost:8081 as I was debugging on my local. 
6. Dates looked pretty off and outdated, so, I tried to turn off and turn on Live Monitoring
7. Re-opened CES console and added new item
8. Voila!!! new items now showed up on Master 
9. Published and yep showed up on Live site too. 


Problem Solved!!!!  Back to being relaxed. :)
I posted this on Coveo Questions and Answers too so some one else in my shoes can probably benefit. 


Thursday, November 17, 2016

Coveo Facet Slider Across Two Fields

Coveo Facet Slider Across Two Fields


We had a requirement that obviously could not be achieved using OOTB Facet Slider control. 
We were aware of that and did know we need to do some customization.  Just did not realize that there wont be any to none straight forward solution. 
I came up with the below solution though was not heavily confident while re-iterating this to the team, just  felt worth a shot. 

Good news is after a lot gymnastics it did work. 

Goal -  Use Coveo Facet Slider on two fields on the same item.
Challenge - Coveo does not allow number based Multi Value Field on their Index, hidden challenge I can not base Facet Slider on a Multi Value String field either.  So, I am at wall in both directions. 

Solution - Fluke at first and reality the next 
Below are the steps I did
1. Turn off Auto Max/Min Calculation on Coveo facet slider on the layout
              We can have some livable manual entries for Max/Min on layout as they are required if not auto-generated, I will see what I can do here.
2.       Next, grab Max/Min across all Neighborhood’s under the current metro page from back end
3.       I overwrite the max/min of Coveo controls with this back end loaded Max/Min patching on to their exposed events.
4.       Now, the filtering by default could be based on only one field(our challenge) –“In our case Maximum Neighborhood Price”
5    I will have to hijack the rest api call that Coveo makes on slider change to inject this expression along with others it does, so I do not interrupt the inner workings of Slider.  Additional Detail: Used Disjunction available from Coveo query builder expressions  


 

Saturday, November 5, 2016

Coveo facets error

Coveo Facets Error 


So, you are on September release of coveo components and you do not have tab component on your search view.  You now want to add coveo facet or the view, which was added fine, but the facet though indexed and pointing to correct field, it would either not render fine on view, what would you do ??? 
I tried doing the below...
  • Checked conside and tried to debug error 
    •  Actual Error - 'Value can not be null or empty ' 
  • What value is coveo asserting for ?checked call stack,  nothing important is missing 
  • Checked Presentation Details and ensured that everything is set correctly. 
  • Dropped facet component , no error any more ...??
  • Slack conversation with Coveo team , no break through!!!! They asked to check if I am not hard coding 'Model .ID' like plain text, but, nope we were doing things the correct way. 


What else ??? Google should have been my first resort, but I like to do basic checks first, seems like I should follow the reverse order. 
Found below link and seemed very much related, so gave it a shot.  That's it!!!
It started working. Yippeeee!


Hope, this would help some one battling this issue and unaware that it is a known issue on September release. 

Few Screen Shots of Error for reference