Dates of the 1st on each month are showing in two rows
i.e. a date of 01-July-1978 is listed as July and May

Current search
Search found 2 items

Filter by publication date:
(remove) 1978
June 1978 (2)
May 1978 (1)

This appears to be due to the search string being from 00:00:00 - 00:00:00
I'm using Solr 3.6.

Comments

nick_vh’s picture

oh my, this bug keeps re-occuring. I'd be very happy if you could dive in and see where this is happening?

cainsworth’s picture

I'm an Oracle database developer and new to drupal/php so although i'd love to have a look whats going wrong I need some help on this.

nick_vh’s picture

Status: Active » Postponed (maintainer needs more info)

Could you write up a nice list of steps on how to reproduce?

cainsworth’s picture

StatusFileSize
new15.05 KB
  • Create content type Solr Test.
  • Add field Solr Date only collect Year Month and Day, do not collect end date.
  • Create two content type of type Solr date, one with date 1st June 2012 one with 20th May 2012 and put the word SOLR in the body text
  • Enable the facet on Solr Date in admin/config/search/apachesolr/settings/solr/facets and Save
  • Ensure the block is shown on the site in admin/structure/block move Facet API: Apache Solr environment: localhost server : solr date
  • Ensure the solr index has been updated with the new content in /admin/config/search/apachesolr
  • Search for the word SOLR
  • Two results are shown
Search results
t1 
SOLR 1 Friday, June 1, 2012 ...

admin - 22 Jun 2012 - 10:34am - 0 comments

t2 
SOLR 2 Sunday, May 20, 2012 ...

admin - 22 Jun 2012 - 10:34am - 0 comments
  • but the facet filter shows three
  • May 19, 2012 (1)Apply May 19, 2012 filter 
    May 20, 2012 (1)Apply May 20, 2012 filter 
    May 31, 2012 (1)Apply May 31, 2012 filter 
  • expanding each date is shows TWO one at 11PM and one at 11PM
  • (-) Remove May 19, 2012 filterMay 19, 2012
    11 PM (1)Apply 11 PM filter 
    12 AM (1)Apply 12 AM filter 
    pwolanin’s picture

    Status: Postponed (maintainer needs more info) » Active
    cainsworth’s picture

    Can anyone provide a solution or workaround for this? It's becoming a major problem now.

    cpliakas’s picture

    Bug posted against Facet API that is probably related. #1667866: Content with created date of 1st of a month appears in previous months facet.

    Still unclear where the underlying issue is, so cross-posting.

    nick_vh’s picture

    Status: Active » Postponed (maintainer needs more info)

    Any update here?

    cpliakas’s picture

    Status: Postponed (maintainer needs more info) » Active

    The bug with steps to reproduce + screenshots are illustrated at #1667866-12: Content with created date of 1st of a month appears in previous months facet. The screenshots show multiple times as opposed to months, but I would suspect the underlying bug is the same.

    cpliakas’s picture

    Status: Active » Needs review
    StatusFileSize
    new35.72 KB
    new35.62 KB
    new776 bytes

    The attached patch resolved my issue on Solr 3.5. See the before and after screenshots below. I would be curious to see if it solves the multiple month issue as well.

    Before

    before-patch-1649158-10.jpg

    After

    after-patch-1649158-10.jpg

    nick_vh’s picture

    unfortunately solr 1.4 does not support that param :( We should add some if version switch. See the solr 4.0 thread to figure out how I added that switch

    cpliakas’s picture

    Status: Needs review » Needs work

    Ah, great point. Let's take a peek at that technique an add it to this fix.

    cpliakas’s picture

    I see. So we are dependent on the issue #1550964: Support Solr 4.0 schema pending addition of the getSolrVersion() API method?

    cpliakas’s picture

    Assigned: Unassigned » cpliakas
    Status: Needs work » Postponed

    Postponing issue pending resolution of #1550964: Support Solr 4.0 schema.

    David_Rothstein’s picture

    I won't pretend this is anything more than an ugly hack, but the attached patch does seem to solve the problem nicely for me.

    David_Rothstein’s picture

    Status: Postponed » Needs work

    Actually, I guess this issue can be un-postponed since #1550964: Support Solr 4.0 schema is fixed?

    I'm on a server that has an older version of Solr, though, so the earlier patch didn't work in my case.