SOLVED

Rolling 12 month period in a content search

Occasional Contributor

We've been trying to reduce the false positives we get from content searches we have set up. One way is to ensure searches only return the past 12 months of data. So at the end of my KQL I have AND (lastmodifiedtime<Today) AND (lastmodifiedtime>[Today]-365). Whilst the (lastmodifiedtime<Today) bit works the -365 days bit doesn't. I cannot see anything in the MS KQL which would cater for this. Has anyone else?

1 Reply
Best Response confirmed by Kevin Spreadbury (Occasional Contributor)
Solution

Me neither, simply specify the dates manually. If you script the creation of the content search via PowerShell, you can dynamically adjust them to cover only the last year.