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 Answer 1

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.
2
  • Thanks, adding managed property to Central admin instead of Site Collection worked...
    – Rameez
    Commented Feb 18, 2019 at 7:50
  • If it helps you, you can mark it as answer. Thanks for your understanding. Commented Feb 18, 2019 at 7:57

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.