Answered Scope-Search and integer values

  • Monday, October 31, 2011 6:24 PM
     
     

    Hello all,

          I am trying to setup scope-search, such that we can query on an integer.

          So far, all I've seen is this link http://social.technet.microsoft.com/Forums/en-US/fastlegacy/thread/87f2d562-20ed-48cb-9d58-bc6e6c7ac476, which gives us a search that looks like:

    and(xml:year:string(2005),filter(meta.collection:collection_name))

    We would like to use a search that looks like:

    and(xml:year:int(2005),filter(meta.collection:collection_name))

    Does anyone out there have any ideas for how to set this up?

     

    Thank you!

    ++Dennis

     

All Replies

  • Tuesday, November 01, 2011 2:58 PM
     
     

    Hi Dennis,

    You may need to map your content as such it appears like the structure below:

    <xml>

      <year type="int">2005</year>

    </xml>

    and your query would look like something xml:year:and(@type:"int","2005"). You can refer to the ESP documentation for indexing DB/XML content in ESP.

     

    Regards

    ken

  • Tuesday, November 01, 2011 3:15 PM
     
     

    Hey Ken,

       I tried your solution with no luck.

       Can you please provide a bit more detail as to your pipeline and what configurations you used?

     

    Thanks!

    ++Dennis

  • Tuesday, November 01, 2011 4:29 PM
     
     Answered

    Hey all,

       And the answer is:

    Assuming your xml looks like:

    <xml>

        <year type="int">2005</year>

    </xml>

    In the XMLScopifier2 stage, you must set the TypeAttribute to "type"

    (btw, if you used <year foo="int">2005</year>, your TypeAttribute would equal "foo")

    Then feed your docs and you will have an integer searchable scope field.


  • Tuesday, November 01, 2011 9:47 PM
    Moderator
     
     

    Hi Dennis,

     

    For values to be  indexed as an integer (or even a float) type, as you said, there are some parameters in the XMLScopifier(webcluster) stage or XMLScopifier2 stage in the document processing pipeline that need to be changed.

    If you are using XMLScopifier (webcluster) in the piepline, change the AutoTyping’ parameter  from 0 to 1.

    If you are using XMLScopifier2 stage in the pipeline, configure the ‘TypeAttribute’ parameter to have the value ‘type’ attribute for mapping.

     

    Usually we would suggest restarting the docprocs after this change, as well as a refeed of the documents.  Glad that you got this covered! 

    Thanks!

    Rob Vazzana | Sr Support Escalation Engineer | US Customer Service & Support

    Customer Service & Support                          Microsoft | Services

  • Wednesday, November 02, 2011 1:17 AM
     
     

    Hi Rob,

    Dennis actually asked this question on my behalf.  I was quite stymied by the Configuration Guide, which suggests pretty plainly in a few places that 'type="int32"' will cause a scope to be typed as numeric, and only mentions in one example that oh, by the way, that assumes that the XMLScopifier2 is configured in such and such a way.

    This is just part of a larger confusion over scope field configuration.  Can you explain the difference between Scopifier, XMLScopifier, and XMLScopifier2, and when to use which?  If I remember correctly it's also possible to use XMLMapper to map scope fields; when would you use that option instead?

    Also, the XMLScopifier2 in my pipeline was automatically configured by FAST based on the scope field definition in the index profile (the description field for the stage reads, "Automatically configured for cluster").  If I modify the configuration, don't I run the risk that it will be overwritten by the system later, such as if the index profile was modified?

    I hope you can give me some clarity on this stuff, or even better, point me at some decent documentation or explanation somewhere.  The Configuration Guide has defeated me utterly.

    Thanks,

    Matthias


    • Edited by fermata1 Wednesday, November 02, 2011 1:17 AM
    •  
  • Friday, November 18, 2011 9:47 PM
    Moderator
     
     

    Hi Matthias,

     

    If you have questions about the Scopifier, XMLScopifier, and XMLScopifier2 stages after reading the ESP Configuration Guide (they are covered on page 58-60), I would recommend that you open a new support ticket with our Technical Support team to cover what in the guide needs additional clarification.

     

    Thanks!

    Rob Vazzana | Sr Support Escalation Engineer | US Customer Service & Support

    Customer Service & Support                          Microsoft | Services