XWiki Platform
  1. XWiki Platform
  2. XWIKI-9537

Allow to specify date intervals for Date and CreationDate facets

    Details

    • Development Priority:
      High
    • Difficulty:
      Medium
    • Similar issues:

      Description

      Right now you can select the date by using a checkbox. This means you can select documents that have been modify just at an exact time.

      Since we cannot select multiple values (XWIKI-9533) this facet is kind of useless.

      A nicer way to search for documents would be to be able to specify intervals when the documents have been modified (startDate and endDate).

      1. current.png
        21 kB
      2. dateFilter1.png
        21 kB
      3. p1.png
        13 kB
      4. p2.png
        13 kB
      5. search-dateFacet-selected.png
        4 kB

        Issue Links

          Activity

          Hide
          Marius Dumitru Florea added a comment -

          Ecaterina Moraru (Valica) It's not enough to be able to specify an interval. This would work for a filter but not for a facet. Facets need to list some options based on the matched results. Silvia Rusu suggested to have some predefined intervals:

          • today
          • last 7 days (or this week)
          • last 30 days (or this month)
          • this year
          • older than this year

          Of course we can let the user specify a custom interval. Unfortunately the support for ranges is limited in Solr. First of all there's no automatic range computation. So you have to explicitly say "group the values of this field in ranges". Then, ranges are defined by specifying the end points and a gap, which means all intervals are equal. So it won't help us specify the intervals listed above. Most probably I will have to create the ranges myself based on the Solr results and use the Solr query syntax to limit the value of a field in the selected interval.

          Ecaterina Moraru (Valica) Can you make a proposal based on the intervals listed above, with the ability to specify a custom interval at the bottom?

          Show
          Marius Dumitru Florea added a comment - Ecaterina Moraru (Valica) It's not enough to be able to specify an interval. This would work for a filter but not for a facet. Facets need to list some options based on the matched results. Silvia Rusu suggested to have some predefined intervals: today last 7 days (or this week) last 30 days (or this month) this year older than this year Of course we can let the user specify a custom interval. Unfortunately the support for ranges is limited in Solr. First of all there's no automatic range computation. So you have to explicitly say "group the values of this field in ranges". Then, ranges are defined by specifying the end points and a gap, which means all intervals are equal. So it won't help us specify the intervals listed above. Most probably I will have to create the ranges myself based on the Solr results and use the Solr query syntax to limit the value of a field in the selected interval. Ecaterina Moraru (Valica) Can you make a proposal based on the intervals listed above, with the ability to specify a custom interval at the bottom?
          Hide
          Silvia Rusu added a comment - - edited

          Hi!
          I have a few more suggestions:

          1. Renaming the Date facet to Last Modification Date, as Date in itself isn't sufficiently explanatory and people might wonder what the difference is between Date and Creation Date.

          2. For the predefined intervals I'm in favor of:

          • Last 24 hours / Last day
          • Last 7 days / Last week
          • Last 30 days / Last month
          • Last 12 months / Last year

          "This week", "This month", "This year" are easily interpretable (3rd week of Oct or the past 7 days; the month or October, which has not finished or the past 30 days etc.).

          I guess we don't necessarily need to add "Older than this year". On second thought this doesn't seem that useful and users can already see all entries if they don't filter the results by date.

          Show
          Silvia Rusu added a comment - - edited Hi! I have a few more suggestions: 1. Renaming the Date facet to Last Modification Date, as Date in itself isn't sufficiently explanatory and people might wonder what the difference is between Date and Creation Date. 2. For the predefined intervals I'm in favor of: Last 24 hours / Last day Last 7 days / Last week Last 30 days / Last month Last 12 months / Last year "This week", "This month", "This year" are easily interpretable (3rd week of Oct or the past 7 days; the month or October, which has not finished or the past 30 days etc.). I guess we don't necessarily need to add "Older than this year". On second thought this doesn't seem that useful and users can already see all entries if they don't filter the results by date.
          Hide
          Marius Dumitru Florea added a comment -

          Ecaterina Moraru (Valica) Any feedback on Silvia's proposed intervals? I've started implementing this and I need to be sure we all agree

          Show
          Marius Dumitru Florea added a comment - Ecaterina Moraru (Valica) Any feedback on Silvia's proposed intervals? I've started implementing this and I need to be sure we all agree
          Hide
          Ecaterina Moraru (Valica) added a comment -

          1. Regarding the rename, I think it's not very important to know when a page has been created. I would actually remove that filter and keep just Date.

          2. Regarding the intervals:

          • 'Today' - I am coming to the office and I want to know what documents have been modified today (this means today as a calendaristic day, not the past 24 hours). I could find this information also in the Activity Stream or in Recently Modified panel, but here I might have additional facets.
          • 'Last 24 hours' / 'Last day' - I don't think 'last day' is a good name for the filter, since 'Yesterday' is used more to name it. Not really sure how often I would use this filter. I would use the 'Custom' filter if I want to be precise.
          • 'Last week' - valid filter
          • 'Last month' - valid filter
          • 'Last year' - kind of valid, but the filter examples I looked at usually stop after Last month.
          • for all the other cases there is a 'Custom' range where you enter the Start and the End date.

          My first proposal woudl have been:

          • Today
          • Last week
          • Last month
          • Custom

          Then I thought it would be more practical to have:

          • Today
          • This week
          • This month
          • Custom
            but it was kind of relative and kind of complicated to compute if you are on Monday for example.

          So I think the best and clearest way to have this is:

          • Today
          • Last 7 days
          • Last 30 days
          • Custom
            (it uses as step the 'day')

          Let me know what you think.

          Show
          Ecaterina Moraru (Valica) added a comment - 1. Regarding the rename, I think it's not very important to know when a page has been created. I would actually remove that filter and keep just Date. 2. Regarding the intervals: 'Today' - I am coming to the office and I want to know what documents have been modified today (this means today as a calendaristic day, not the past 24 hours). I could find this information also in the Activity Stream or in Recently Modified panel, but here I might have additional facets. 'Last 24 hours' / 'Last day' - I don't think 'last day' is a good name for the filter, since 'Yesterday' is used more to name it. Not really sure how often I would use this filter. I would use the 'Custom' filter if I want to be precise. 'Last week' - valid filter 'Last month' - valid filter 'Last year' - kind of valid, but the filter examples I looked at usually stop after Last month. for all the other cases there is a 'Custom' range where you enter the Start and the End date. My first proposal woudl have been: Today Last week Last month Custom Then I thought it would be more practical to have: Today This week This month Custom but it was kind of relative and kind of complicated to compute if you are on Monday for example. So I think the best and clearest way to have this is: Today Last 7 days Last 30 days Custom (it uses as step the 'day') Let me know what you think.
          Hide
          Silvia Rusu added a comment -

          1. For the rename, independently of whether we keep the "Creation date" facet, "Date" remains insufficiently descriptive, so +1 for a rename.
          2. For the intervals
          " Today
          Last 7 days
          Last 30 days
          Custom
          (it uses as step the 'day') " sounds ok

          Show
          Silvia Rusu added a comment - 1. For the rename, independently of whether we keep the "Creation date" facet, "Date" remains insufficiently descriptive, so +1 for a rename. 2. For the intervals " Today Last 7 days Last 30 days Custom (it uses as step the 'day') " sounds ok
          Hide
          Ecaterina Moraru (Valica) added a comment -

          Some comment for what it has been implemented:

          • I know I didn't represent well in my mockup, but in my mind the flow was like: you need to select 'Custom interval' and then you specify the interval. When I tried to do that, I was redirected to 'Any date';
          • Also (being in the facets and consistent with the other facets that are applied instantly) I was expecting for the dates to be applied instantly when defining 'Start' or 'End' date.
          Show
          Ecaterina Moraru (Valica) added a comment - Some comment for what it has been implemented: I know I didn't represent well in my mockup, but in my mind the flow was like: you need to select 'Custom interval' and then you specify the interval. When I tried to do that, I was redirected to 'Any date'; Also (being in the facets and consistent with the other facets that are applied instantly) I was expecting for the dates to be applied instantly when defining 'Start' or 'End' date.
          Hide
          Silvia Rusu added a comment -

          I think the reason why the date is not applied instantly is that you can define both "Start" and "End" to specify an interval. This means after you have defined "Start" we can't know whether you want to see the filtered results or you want to also define an "End" date before you see the final results.

          Show
          Silvia Rusu added a comment - I think the reason why the date is not applied instantly is that you can define both "Start" and "End" to specify an interval. This means after you have defined "Start" we can't know whether you want to see the filtered results or you want to also define an "End" date before you see the final results.

            People

            • Assignee:
              Marius Dumitru Florea
              Reporter:
              Ecaterina Moraru (Valica)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: