0

How can I get my out of the box search to return result.only for the last 3 years

Thanks in advance

1

You can modify the Search Results web part and hard code a date, such as 3/29/2015. But, I don't know of a way to use a calculated date.

The Enterprise Search Center search results pages are web part pages. (The local/site search results page, osssearchresults.aspx, is only editable on the web server.) Go to your search center, do an "Everything" search and then edit the page. Edit the Search Results web part and in the Properties panel click Edit Query.

In the "Query text" box enter something like:

write>"3/18/15" AND {searchboxquery}

enter image description here

0

Try this in the search box:

write>3/27/15

You can create searches on date ranges using “..”.

Example: write=2/1/2015..2/8/2015

You can also use the names of some date ranges.

Example: write="this week"

The supported ranges are:

  • today
  • yesterday
  • this week
  • this month
  • last month
  • this year
  • last year
6
  • Hi Mike, Can you please elaborate more. What i want is to default my search to show only results for the last 3 years
    – naijacoder
    Mar 29 '18 at 1:39
  • In the search box type: write>3/27/15 Mar 29 '18 at 2:04
  • Are you asking how to do the search, or how to modify the search results page to only show the last three years? Mar 29 '18 at 2:05
  • Sorry Mike . how t modify the search results page to only show the last 3 years. Thanks
    – naijacoder
    Mar 29 '18 at 5:08
  • If I were you I'd add the modifier to the Result Source. Mar 29 '18 at 12:32

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.