SharePoint Server 2013: KeywordQuery and searchexecutor not accepting date range for Created date column

Shruti Sharma 21 Reputation points

I'm writing code to run search query through Server Object Model. I'm getting the error message 'We didn't understand your search terms. Make sure they're using proper syntax.', when I pass below query to code.


This works fine on out of the box search page but not through custom code.
Can someone please help.

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,596 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,021 Reputation points

    Hi @Shruti Sharma ,

    For SharePoint KeywordQuery , you could refer to this documentation:

    You could try to use this code:

    Created>=2020-03-18 AND Created<=2021-12-31  

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful