4

I don't have any Site Columns, any Catalog Site Collection or Catalog list. I have about 30 Terms and TermSets (in MMS). Now I want to use them as a search based menu. By using Powershell I have created Managed Properties, Crawled Properties and mapped them to each other. I have enabled the Terms and TermSets for Faceted Navigation and added the newly created Managed Properties to the Terms as Refiners. run Full Crawl. Now I want to retrieve Terms based on their Refiners by using Search Rest API. is it possible? because when I run following queries get no rows.

 http://mydomain/_api/search/query?querytext='ManagedPropertyName:TermName'
 http://mydomain/_api/search/query?querytext='termName'&refiners='ManagedPropertyName'

I tested several other options but no results. Is it possible to get Terms based on their refiners withou having Correspoinding Site Columns, Catalog Site Collection or Catalog list? Thank you.

4 Answers 4

3

I know this is an old post, but I thought I may be able to shed some light on this subject. As a couple of folks pointed out above, the following syntax will access the refiners for a managed property called owsRoles.

http://server/_api/search/query?querytext='Query text'&refiners='owsRoles'
  1. Make sure that the managed property is mapped to the appropriate crawled property.
  2. Be certain that you have "refinable" checked in the managed property properties.

To filter by the same managed property, the proper syntax would be:

http://server/_api/search/query?querytext='Query text'&refiners='owsRoles'&refinementfilters='owsRoles:equals("Manager")'

(where "Manager" is the role you would like to filter by)

Hope this helps someone,

2

I think you can make a call like this to get the values for owstaxidmetadataalltagsinfo refiner:

http:// siteurl /_api/search/query?querytext='*'&refiners='owstaxidmetadataalltagsinfo'

You will get some values with this format:

L0|#036f7c08a-0176-47e9-9d70-070291ce0e32|Data Warehousing

2
  • was this useful ?
    – Bogdan M.
    Commented May 16, 2013 at 10:16
  • no it wasn't, sorry,
    – Medes
    Commented May 16, 2013 at 11:53
1

Based on my knowledge you could do that in someway. I found a post of Mastykarz where I explain how get the list of terms by js. Using this you should be able to do a search query: http://blog.mastykarz.nl/building-global-navigation-sharepoint-2013/

Another good point of view is this tool: http://sp2013searchtool.codeplex.com/

it could help you to understand how to do a rest call based on a term search context.

2
  • I have already read these posts. what I want to do is getting terms based on their refiners by using REST API. I can get all Terms and filter the result on client side but I want to do the filtering on server side by using REST API. I have used the tool but my queries return no results.
    – Medes
    Commented Apr 29, 2013 at 9:34
  • In this case I think you have to dev your own web services. Commented Apr 29, 2013 at 9:42
0

This is the url, you already posted it.

http://server/_api/search/query?querytext='Query text'&refiners='property1,property2,etc'

If this doesn't work then your managed property is either not crawled, you have no access with that user, you have the refiner name wrong or simply there are no results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.