none
Person search to metadata field with search REST API on SP2013 online RRS feed

  • Question

  • Hi!

    I'm developing a sandbox solution to be deloyed on SharePoint 2013 online. This solution contains a web part for a custom functionality. I have a need to make a query against data in user profiles based on two custom metadata properties (mapped to termsets). Is it possible to create this kind of query by using search REST API (with javascript)? So I need all persons whos metadata field MyOwnTerms contains specific value(s) passed to search?
    I can get all users with /_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'very (if i set the rowlimit to very high) and the results contains my cystom field MyOwnTerms but there is too much of results to loop through just for filtering. I cannot reduce rowlimit because I need ALL the persons with certain metadata value in this field. Is there any way to make this work?

    .Ana

    Tuesday, April 16, 2013 9:12 PM

All replies

  • I went through the same problem and yes it is possible. In my case, I created a Managed Properties specific to my site column metadata, and assign the value only the label of the column metadata for this managed property. So it returns only the value of the name and not the metadata ID | Name as the default. 
    So, just move on selectproperties the name of your managed metadata, so it returns the correct value.
    Thursday, September 4, 2014 7:25 PM
  • Lookup the managed property for your column and add to query text.  Also try adding refiners:

    ?querytext='*'&refiners='owstaxidmetadataalltagsinfo'


    kashif

    Thursday, September 4, 2014 8:42 PM