Search fluent api concept intro#271
Search fluent api concept intro#271koltyakov wants to merge 3 commits intoSharePoint:devfrom koltyakov:dev
Conversation
|
Hi @koltyakov, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
|
Hi Patrick (@patrick-rodgers), There was an issue #207 sometime before, asking how to use pagination with search results. Could you please take a look, is it ok with a whole structure of a library. Thanks! |
|
@koltyakov - sorry been slammed, will be looking at this hopefully this week but like what I see initially. I need to pull it down and really have a look - but didn't want you to think I'm ignoring the PR :) |
|
|
||
| // Used with alternative search | ||
| if (typeof query === "undefined" && typeof this.searchQuery !== "undefined") { | ||
| if (typeof this.pageNumValue !== "undefined") { |
There was a problem hiding this comment.
Do the defaults here match the OOB defaults when hitting the search endpoint without specifying values?
|
What about a slightly different syntax? |
|
Going to close this - but I took a lot of the ideas and used them in #433. Have a look and let me know what you think there. Will also be pushing these updates out in a beta shortly so folks can try it out and provide feedback. |
|
Thanks Patrick, SearchQueryBuilder thing looks gracefully! |
What's in this Pull Request?
This PR introduces the concept which allows adding some fluent wrapper to search API, such as
startRow,rowLimit,pageNumoptions for search queryable instance.Guidance
searchmethod inRestclass returns SearchResults promise, which prevents adding any additional options to a query in a fluent way.An alternative approach is applied -
searchAdvmethod is added to Rest class.searchAdvreturns Search object, allowing to define additional properties in a chain before actual execute.Examples
Skipping results, defining results amount on a page
Pagination helper