none
Mutlit value Crawled Property as different Refiners RRS feed

  • General discussion

  • Hi All,

    Like the title of this thread says, I was able to split a ; seperated Crawled property and show them as different refiners using AttributeSplitter

    For instance, I have a managed property 'author' which is refiner enabled. Also have a crawled property 'author'. Below is hwo my source look like

     NAME="Author" CONTENT="Freddie;Eddie;King Khan">
    

    I have added one AttributeSplitter process to my etc\pipelineconfig.xml. Below is the sample

     <processor name="AuthorAttributeSplitter" type="general" hidden="0">
      <load module="processors.Basic" class="AttributeSplitter"/>
      <desc>
    <brief>Split document attributes into lists</brief>
    <p>The mapping defined by the Attributes parameter has the form "a:b:int c:d:float e:f:str g:h", where a is split at each Separator and copied to b. The third part of each mapping is optional and defines a type conversion on each value in the list. The default is string (no conversion).</p>
      </desc>
      <input>
         <attribute name="&lt;Input&gt;"/>
      </input>
      <output>
         <attribute name="&lt;Output&gt;"/>
      </output>
      <config>
         <param name="Separator" value=";" type="str"/>
         <param name="Attributes" value="author:author:str" type="str"/>
      </config>
      <ops><add/><partialupdate/><del/></ops>
    </processor>
    
    
    


    Added the new stage to my default pipeline. Below is sample

       <processor name="PropertiesReporter"/> 
       <processor name="AuthorAttributeSplitter"/>
       <processor name="LanguageDetectorSecondPass" />
    

    Then restart the procservers, psctrl reset.

    Crawl the above posted sample document and see the enable Author Refiner in your web part, for instance. You can see 3 Refiners each carring one author.

    I believe this should help.

    Experts, Plz share your thoughts :) Mikael, What do you think?

    Freddie


    Freddie Maize ..A story with Glory is History. Doesn’t matter whether Glory rest in the world of Demon or God. Lets create History..
    • Edited by freddieMaize Tuesday, November 15, 2011 12:16 PM
    Tuesday, November 15, 2011 12:13 PM

All replies

  • HI freddie

    I implemented as you have shown above.My field is sharepoint multilookup field and my xml is as follows

     

      <processor name="KBTagsAttributeSplitter" type="general" hidden="0">
      <load module="processors.Basic" class="AttributeSplitter"/>
      <desc>
    <brief>Split document attributes into lists</brief>
    <p>The mapping defined by the Attributes parameter has the form "a:b:int c:d:float e:f:str g:h", where a is split at each Separator and copied to b. The third part of each mapping is optional and defines a type conversion on each value in the list. The default is string (no conversion).</p>
      </desc>
      <input>
         <attribute name="&lt;Input&gt;"/>
      </input>
      <output>
         <attribute name="&lt;Output&gt;"/>
      </output>
      <config>
         <param name="Separator" value="," type="str"/>
         <param name="Attributes" value="ows_kbtags:kbtags" type="str"/>
      </config>
      <ops><add/><partialupdate/><del/></ops>
    </processor>
    
      <processor name="PropertiesReporter"/>
    		    <processor name="KBTagsAttributeSplitter"/>
          <!-- Process managed properties -->
          <processor name="LanguageDetectorSecondPass" />
    

     

    when I crawl then the value doesn't get seprated.

     <param name="Separator" value="," type="str"/>
    

    I have replaced "," with ";" but nothing happened so I need to know Am I missing something?

    Wednesday, November 16, 2011 3:13 PM
  • Hi,

    >><param name="Attributes" value="ows_kbtags:kbtags" type="str"/> Your snippet

    Change it to <param name="Attributes" value="ows_kbtags:kbtags:str" type="str"/> Your snippet

    str is defalut but still.

    Restart your procservers. Also make you sure you have followed all the steps properly. Add a SPY stage to see what ows_kbtags actually carries. Is your seperator ; ?

    Post back if are you still unable to figure it out

     

     


    Freddie Maize ..A story with Glory is History. Doesn’t matter whether Glory rest in the world of Demon or God. Lets create History..
    Thursday, November 17, 2011 10:11 AM
  • HI

    I have added spy and my value for tag is as follows

    ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127 <type 'list'>: ['Beauty', 'Make Up', 'Sharepoint', 'processor', 'software']

    ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127  ====> META crawled property <type 'str'>: CP

     

    When I have multiple value in field then the type is list but when I have single item in my lookup field then I have the following

    ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127 <type 'str'>: beauty

    ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127  ====> META crawled property <type 'str'>: CP

    so what should I use now in type

    Thursday, November 17, 2011 11:45 AM
  • Hi Freddie,

    I think it's the easiest way to solve it, and the ESP way .)

    But I try to stay away from unsupported solutions, and I am on a mission to prove that everything can be done according to "supported" methods, hehe. And so far most things can, but it is certainly frustrating not being able to just tap into what is there in Python.

    That said... introducing Python in many MS environments would be a technical hurdle they might not want to jump, and the documentation you have used to create this custom stage is not documented in FS4SP, only if you have access to FAST ESP. And who knows, maybe a CU will overwrite the pipelineconfig.xml and remove all custom changes at one point. Can you afford to take that risk (how small it might be)?

    Enough ranting.... and people will probably like the samples you provide :)

    -m 


    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    Thursday, November 17, 2011 12:02 PM
  • ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127 <type 'list'>: ['Beauty', 'Make Up', 'Sharepoint', 'processor', 'software']

    ATTRIBUTE 00130329-0000-0130-C000-000000131346:ows_KBTags:4127 <type 'str'>: beauty

    Hi,

    Just wondering how a crawled property can be of two types? Anyways, did you try creating a crawled property for ows_KBTags as a String data type and tried the same?


    Freddie Maize ..A story with Glory is History. Doesn’t matter whether Glory rest in the world of Demon or God. Lets create History..
    • Edited by freddieMaize Thursday, November 17, 2011 2:05 PM
    Thursday, November 17, 2011 12:38 PM
  • Hi Mikael,

    Thanks for the response and Time :) Honestly Appreciated.

    Back to topic. True you are. However, the way I look at it & my idea is, we can proivde custom solutions with whatever we have in hand right now instead of trying to prediciting what the next version might look like for any such version change, it is going to be a migration and not a binary software upgrade, I believe. In fact that is how I was able to conviced my Client :P

    Anyways, Thanks again!! Your work for this community is outstanding :)

     

     


    Freddie Maize ..A story with Glory is History. Doesn’t matter whether Glory rest in the world of Demon or God. Lets create History..
    • Edited by freddieMaize Thursday, November 17, 2011 2:04 PM
    Thursday, November 17, 2011 2:03 PM
  • This is sharepoint multilook up field. Search generates 2 crawled property for this which is as follows

    ows_kbtags ()         variant -4127

    ows_kbtags(text)    variant -31

    Now when we have multiple values in the field then we get the value in ows_kbtags() but if you have single value in field then we get value in ows_kbtags(text). So while creating managed property we have to use both for mapping so that result comes properly.

    I don't know why fast generates two crawled properties but this is the way.So any suggestion what to do for this?

    I have tried using "ows_kbtags:kbtags:str" but no result


    • Edited by agarwal Thursday, November 17, 2011 2:15 PM Details
    Thursday, November 17, 2011 2:14 PM