0

I have a document library on SharePoint Online, which has 35,000 documents in it. One of the metadata columns is a date column, and I'd like to be able to search for documents that fall between two dates.

Ordinarily I'd perhaps use a filter on the column, but this won't work for large document libraries because of the 5,000 document view limit of SharePoint. (i.e. not all the date possibilities are listed when you try to filter that column - only the 5,000 that are 'in view'. Plus the fact that you are presented with a huge list of specific dates that appear in the column, and they aren't in date order! So impossible to use really.).

Is it possible to simply create something that allows you to type in 2 specific dates and then search for anything within these dates?

2 Answers 2

0

Yes, it's possible to use a date range to search like the below:

size>1000000 AND size<2000000 AND  Created:7/1/2021..7/10/2021

KQL reference can be found here

3
  • That's really helpful thanks. That works a treat. However, for my own columns, I have a column named DOCUMENT_DATE, and if I try to use something like DOCUMENT_DATE:7/1/2020..10/1/2020 it doesn't return any result, but there are documents with a date within that range? (I'm using UK dates by the way dd/mm/yyyy)
    – Simon
    Commented Oct 1, 2021 at 15:19
  • Are these columns 'Site Columns'? May need to check if they have been converted to 'Managed' Properties. Please check here Commented Oct 1, 2021 at 19:08
  • Ah, these aren't Site Columns. Do they need to be?
    – Simon
    Commented Oct 4, 2021 at 8:09
0

Even with KQL, if the result set is too large, users will have trouble finding the items. Moreover, when it comes to the standard users, KQL is not the best way to filter the records. Syntax is quite tricky to remember.

In my organization, we faced the same issue with both lists and document libraries. We found the following simple tool and not only date range filter, but also it resolved so many other SPO related issues we had.

https://fleximal.com.au/products-services/sharepoint-online-search/

Document Library:

enter image description here

Custom List:

enter image description here

It can search and return any number of items as well (not hampered by SPO List View threshold).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.