While working on a project involving setting up FAST Search Server 2010 for Sharepoint, I ran into trouble setting up a custom date refiner. I was hoping to see refiner values that said things like ‘Last 30 Days’, ‘Last 60 Days’, and ‘Earlier’, but instead I saw this, which is the date ranges for the last 30 days, last 60 days, etc.
This is a problem, because it’s much harder to quickly grasp what the different groups are. Which is easier, to understand ‘Last 30 days’ or ‘From 2012-08-12 to 2012-09-12’? Considering that most of the date range is not visible, this makes it even harder to consume. I wanted to fix this.
Let’s back up a little. What is a refiner?
In this screenshot, you can see that I searched for ‘shoe.’ On the left-hand side, ‘Shoe Size’ is a refiner, because it allows me to narrow down, or ‘refine’, the search results that I see.
FAST Search for Sharepoint has this same capability. On the search results page, there is a ‘Refinement Panel’ web part, which has a ‘Filter Category Definition’ property in the ‘Refinement’ section of the Web Part properties.
NB: If you customize anything here, be sure to uncheck the ‘Use Default Configuration’ checkbox, or it will ignore whatever you put in.
The ‘Filter Category Definition’ propery contains XML that defines what refiners to show on the search results page. I had a property called ‘Published’, which was a date field, and I was able to get the refiner to appear, but I was hoping to see refinement such as ‘Last Week’, ‘Last Month’, etc. Instead, this is what I saw:
I double and triple checked the XML I had written, and everything looked perfect. I even copy and pasted the XML from the built in date refiner, which uses the ‘write’ property, and it still didn’t display properly.
After much pain and agony, I decided on a whim to try to use the lowercase version of the property - that is, I put ‘published’ in, instead of ‘Published’, even though everything else in FAST refers to the property as ‘Published’. Here is what I ended up with:
<Category Title="Published" Description="When the item was published" Type=
Et Voila, it worked! This was the proper result I was expecting:
The moral of the story is that when you’re setting up managed properties in FAST Search for Sharepoint, be sure to use lowercase versions of the property name everywhere. Otherwise you could run into strange problems.