question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New command: get search results

See original GitHub issue

Execute SharePoint Search query

command: spo search -q|--query <query> --sourceId [sourceId] --sourceName [sourceName] --trimDuplicates [trimDuplicates] --allResults -p|--selectProperties [selectProperties] --refinementFilters [refinementFilters] --queryTemplate [queryTemplate] --sortList [sortList] --startRow [startRow] --rowLimit [rowLimit] --rowsPerPage [rowsPerPage] --rankingModelId [rankingModelId] --culture [culture] --refiners [refiners] --hiddenConstraints [hiddenConstraints] --enableStemming [enableStemming] --enablePhonetic [enablePhonetic] --processBestBets [processBestBets] --clientType [clientType] --properties [properties] --enableQueryRules [enableQueryRules] --processPersonalFavorites [processPersonalFavorites] --allResults

  • you can specify either sourceId or sourceName but not both
  • when you specify sourceName and properties the values should be merged into a single properties string
  • allResults - set to retrieve all results

The goal would be to bring all different parameters to provide full feature to Search like PowerShell.

For more information about the meaning and usage of the different options see https://docs.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview

For more information about the sample implementation see the Submit-PnPSearchQuery cmdlet

For information about setting the result source name see: http://www.techmikael.com/2015/01/how-to-query-using-result-source-name.html

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
wobbacommented, Feb 23, 2018

@waldekmastykarz because I had too much time on my hands 😉

1reaction
wobbacommented, Feb 13, 2018

@waldekmastykarz in prioritized order:

  • query <- KQL
  • sourcename <- better than resultsourceid. SPSite,Name
  • trimduplicates <- default set to false
  • allresults <- loop internally for paging to get all results
  • selectproperties <- specify other mp’s than the oob ones
  • refinementfilters <- could be an option to get these instead of results(?)
  • querytemplate
  • sortlist

And then there are all the parameterts of Submit-PnPSearchQuery

Read more comments on GitHub >

github_iconTop Results From Across the Web

Search Google by date with new before: and after
Google has announced a new search bar command that enables users to filter results for a desired date range. The “before:YYYY-MM-DD” and ...
Read more >
Google Search Operators: 40 Commands to Know in 2022 ...
Google search operators are your secret tools to get enhanced info you can use for SEO, content research, & more. Get the full...
Read more >
Search-Mailbox (ExchangePowerShell) - Microsoft Learn
Use the Search-Mailbox cmdlet to search a mailbox and copy the results to a specified target mailbox, delete messages from the source mailbox,...
Read more >
Getting a URL from search results based on a query, and ...
1 Answer 1 · Opens browser at amazon.com · Clicks search box · Searches for item title · Navigates to item page ·...
Read more >
How to Use Advanced Google Search Commands - Lifewire
Use search commands to get the results you expect and avoid showing unnecessary items. We've compiled a list of all these little-known Google ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found