Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top