Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6908019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:30:28+00:00 2026-05-27T08:30:28+00:00

I have an event table which has start date and end date like this

  • 0

I have an event table which has start date and end date like this

==============================================
id   |   name       | start_date |  end_date
==============================================
1    | Test Event 1 | 2011-11-20 | 2011-12-20 
----------------------------------------------
2    | My Event 2   | 2011-12-05 | 2011-12-26 
----------------------------------------------
3    | My Event 3   | 2012-12-26 | 2012-01-11
----------------------------------------------

Now I want to have a solr facet which looks like this and i can’t seem to get the params right.

==================
Dates 
------------------
Today [2]
This Week [2]
This Month [2]
Next Month [1]

Please note that the facet has to consider both start date and end date. Sort of gouping ?

What should be the faceting parameters for this ?

Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:30:28+00:00Added an answer on May 27, 2026 at 8:30 am

    I finally got it working using solarium libraries Facet Multi Query based on the example http://wiki.solarium-project.org/index.php/V2:Facet_multiquery

    The part in my Zend App looks like

    $dateFacetSet = $query->getFacetSet();
    $dateFacet = $dateFacetSet->createFacetMultiQuery('dates');
    $dateFacet->createQuery('Today', 'type:event AND sdate:[* TO NOW/DAY] AND edate:[NOW/DAY TO * ]');
    $dateFacet->createQuery('This-Week', 'type:event AND sdate:[* TO ' . $this->view->date_w["end"] . 'T23:59:59Z] AND edate:[' . $this->view->date_w["start"] . 'T00:00:00Z TO * ]');
    $dateFacet->createQuery('This-Month', 'type:event AND sdate:[* TO ' . $this->view->date_m["end"] . 'T23:59:59Z] AND edate:[' . $this->view->date_m["start"] . 'T00:00:00Z TO * ]');
    

    If anyone wants to know more, please let me know.

    These params catch what i needed so far but haven’t tested extensively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a table that has event name and event date. if i want
I have a table called Event. A column has duration--which is...how long that event
I have a table which has hierarchy in it. Lets start with Id =
I have an Oracle table which contains event log messages for an application. We
I have the following sql query : SELECT DATE(procedures.start) date, name, COUNT(procedure_types.id) count FROM
I have a projects table which has two foreign keys for users (user_id and
I have table Event and table Sessions and each event has a set of
I have a table of data which represents a series of events that persons
I have 3 tables event, location, event_location. Event can have multiple locations. Location table
I have a table that functions as an event log and stores the users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.