Hey,
In case this is of interest to anyone else, the issue was that the date refiner 
was set to be a deep refiner. Unchecking this box allowed it to be used in the 
refinement panel like Created
Cheers
Nigel
From: nigel_wither...@hotmail.com
To: ozmoss@ozmoss.com; conrad.grob...@gmail.com
Subject: Custom DateTime Search Refiner (FAST SP2010)
Date: Thu, 21 Nov 2013 01:03:39 +0000




Hey all,
Hoping someone can help me out there....
We are attempting to create a DateTime search refiner for a custom site column, 
with the refiner acting exactly as the ootb "Modified Date" refiner does - i.e. 
has refining options like last week, last month, last 6 months etc.
To do this I have:
- Created a Managed Property - set as DateTime, mapping the crawled property 
for my custom site column, checked the sort, refine and deep refine options- 
Performed a full crawl- Added the managed property to the Search core results 
fetched properties:
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><Columns><Column 
Name="wfsocdate"/><Column Name="wfnsoimageurl"/><Column 
Name="wfretailer"/><Column Name="wfjdebusinessunit"/><Column 
Name="wfnsoretailergroup"/><Column Name="wfnsofeature"/><Column 
Name="WorkId"/><Column Name="Rank"/><Column Name="Title"/><Column 
Name="Author"/><Column Name="Size"/><Column Name="Path"/><Column 
Name="Description"/><Column Name="Write"/><Column Name="SiteName"/><Column 
Name="CollapsingStatus"/><Column Name="HitHighlightedSummary"/><Column 
Name="HitHighlightedProperties"/><Column Name="ContentClass"/><Column 
Name="IsDocument"/><Column Name="PictureThumbnailURL"/><Column 
Name="Url"/><Column Name="ServerRedirectedUrl"/><Column 
Name="FileExtension"/><Column Name="SpSiteUrl"/><Column 
Name="docvector"/><Column Name="fcocount"/><Column Name="fcoid"/><Column 
Name="PictureHeight"/><Column Name="PictureWidth"/></Columns></root>
- Modified the Refiner web parts XML to render the new filter:
<Category               Title="SOC Date"                Description="SOC Date"  
                
Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator"
                MetadataThreshold="5"                   
NumberOfFiltersToDisplay="6"                    MaxNumberOfFilters="0"          
        SortBy="Custom"                 ShowMoreLink="True"             
MappedProperty="wfsocdate"              MoreLinkText="show more"                
LessLinkText="show fewer" >             <CustomFilters 
MappingType="RangeMapping" DataType="Date" ValueReference="Relative" 
ShowAllInMore="False">                      <CustomFilter CustomValue="Past 24 
Hours">                              <OriginalValue>-1..</OriginalValue>        
             </CustomFilter>                 <CustomFilter CustomValue="Past 
Week">                          <OriginalValue>-7..</OriginalValue>             
        </CustomFilter>                 <CustomFilter CustomValue="Past Month"> 
                        <OriginalValue>-30..</OriginalValue>                    
</CustomFilter>                 <CustomFilter CustomValue="Past Six Months">    
                        <OriginalValue>-183..</OriginalValue>                   
</CustomFilter>                 <CustomFilter CustomValue="Past Year">          
                <OriginalValue>-365..</OriginalValue>                   
</CustomFilter>                 <CustomFilter CustomValue="Earlier">            
                <OriginalValue>..-365</OriginalValue>                   
</CustomFilter>         </CustomFilters>        </Category>

However the refiner never appears. I changed the SearchResults XSLT to show the 
complete data being brought back for each result item, and found that the 
difference between my custom date column and the created date column (with 
managed metadata property name "Write") is that my date is in UTC format, where 
the Write date is not:
 <Result>      <id>1</id>      <wfsocdate>2013-11-15T13:00:00Z</wfsocdate>      
<workid></workid>      <rank>3111</rank>      <title>Title data</title>      
<author>author data</author>      <size>0</size>      <path>url data</path>     
 <description></description>      <write>21/11/2013</write>
      [stuff removed]
</Result>

Can anyone confirm that this is the issue with my refiner, and if so how do I 
get the indexer to crawl the date in the same format as the "Write" date? Do I 
need to do this myself with the results XSLT? If I do, how will this work with 
the refiner (I assume the refiner is working with the data returned in the 
managed property, not the transformed data shown in the results)?
Many thanks
Nigel
                                                                                
  
_______________________________________________
Sponsored by Infotext - Amazing Search for Microsoft SharePoint - 
http://www.infotext.com/
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to