0

I am Developing a SharePoint Extension web part for O365. The purpose of the web part is to allow the user to click on a letter of the alphabet and then through the search API return all the items with a title that begins with the selected letter.

I have figured out how to use the search API for finding keywords:

/_api/search/query?querytext='sharepoint'

But I don't know how to use the API to get all items that begin with a certain letter. I have tried googling an answer for this but haven't found anything. Is what I am trying to do even possible?

1

Have you tried to use refinement filters or wild cards in SharePoint search API?

Maybe one of the endpoint given below:

_api/search/query?refinementfilters='Title:("micro*")'

Reference: SharePoint 2013 REST Api - refinementfilters "Containts" OR "SubstrinOf" operator

Or

http://server/_api/search/query?query_parameter=value*

Reference: SharePoint Search REST API overview

Also, check this useful article on KQL, Keyword Query Language (KQL) syntax reference.

  • Thanks, for the references. I think will work for me. – user5013 May 2 at 15:26
  • Welcome. Please upvote and accept the answer, it will help others to find the best solution easily. – Ganesh Sanap May 2 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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