Bug 386257 - Provide a method of storing and parsing relative dates
Summary: Provide a method of storing and parsing relative dates
Status: REPORTED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.39.0
Platform: Neon Linux
: NOR wishlist
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-27 16:29 UTC by Nate Graham
Modified: 2018-10-29 19:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.