Bug 386257

Summary: Provide a method of storing and parsing relative dates
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Nate Graham <nate>
Component: generalAssignee: Pinak Ahuja <pinak.ahuja>
Status: REPORTED ---    
Severity: wishlist CC: stefan.bruens, tagwerk19
Priority: NOR    
Version First Reported In: 5.39.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2017-10-27 16:29:55 UTC
Right now Baloo search strings are stored encoded and evaluate to something like this:

baloosearch:?json={
    "dayFilter: 0,
    includeFolder: "/home/dev",
    "monthFilter: 0,
    "searchString: "modified>=2017-10-01 filename:\"foo%\",
    "term: {
        "$and: [
            {
                "modified: {
                    "$gte: "2017-10-01"
                }
            },
            {
                "filename: {
                    "$ct: "foo"
                }
            }
        ]
    },
    "yearFilter: 0
}
title=Query Results from 'foo'


Note the use of absolute dates. This becomes problematic when a Baloo URL is used as the basis for a saved search in Dolphin. With the above query, results from October will returned even once it's November and beyond.

Baloo should provide a means of storing and parsing relative dates so that Dolphin can use them and call up saved searches with date filters relative to the current date.