1

I want to retrieve all the library items of a content type "Prod Request". I am using REST API for this. I am not able to get lookup column values.In below query my lookup column name is LookUp1. I am getting all column values except LookUp1. I mapped LookUp1 column to managed properties and ran a full crawl also but no use. Is there a different way for doing it in search api? Here is my query...... Please assist.

$.ajax({             
    url: https://mysite.domain.com/_api/search/query?querytext='contenttype:Prod Request'&rowlimit=100&trimduplicates=false&selectproperties='Title,LookUp1',
    method: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" 
},
    success: function (data) {...........

Some more info... lookup column managed property is added at Site Collection administration level not at central admin level. Full CRAWL is also performed... I also tried modifying $expand my lookup column like below

url: "https://mysite.domain.com/_api/search/query?querytext='contenttype:Prod Request'&rowlimit=100&trimduplicates=false&selectproperties='Title,LookUp1/Title'&$expand=LookUp1",

but it didnt work

1

Please check the points below:

  1. Create the managed property in search service application level instead of site collection level. Delete site collection level property, then start a full crawl
  2. Make sure the managed property is searchable, queryable and retrievable.
  • Thanks, adding managed property to Central admin instead of Site Collection worked... – Rameez Feb 18 at 7:50
  • If it helps you, you can mark it as answer. Thanks for your understanding. – Hellofiona_MSFT Feb 18 at 7:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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