Solr
  1. Solr
  2. SOLR-497

SolrJ QueryResponse does not support date faceting results

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      The QueryResponse provides getFacetFields for drilling down into facets. It would also be handy to have similar info for facet dates.

      1. SOLR-497.patch
        8 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        With your permission Grant, here's a patch to add this functionality.

        Since the facet.date response is not a homogenous NamedList of Numbers, I added the non-number members of facet date response such as GAP and END as attributes in FacetField.java The rest of the facet date responses such as date values and facet.date.other params are handling as FacetField.Count objects

        QueryResponse has a new method getFacetDates which returns a list of FacetField (modified as above).

        A simple test with a xml response for testing has been added.

        Show
        Shalin Shekhar Mangar added a comment - With your permission Grant, here's a patch to add this functionality. Since the facet.date response is not a homogenous NamedList of Numbers, I added the non-number members of facet date response such as GAP and END as attributes in FacetField.java The rest of the facet date responses such as date values and facet.date.other params are handling as FacetField.Count objects QueryResponse has a new method getFacetDates which returns a list of FacetField (modified as above). A simple test with a xml response for testing has been added.
        Hide
        Grant Ingersoll added a comment -

        Committed revision 638357. Thanks Shalin!

        Show
        Grant Ingersoll added a comment - Committed revision 638357. Thanks Shalin!
        Hide
        Hoss Man added a comment -

        FYI: the QueryResponseTest added by this patch has been failing in the nightly.sh build (but not the hudson build) since it was added.

        reopening the issue until we figure out if it is a problem with teh coe added by this issue, or a larger underlying bug.

        Show
        Hoss Man added a comment - FYI: the QueryResponseTest added by this patch has been failing in the nightly.sh build (but not the hudson build) since it was added. reopening the issue until we figure out if it is a problem with teh coe added by this issue, or a larger underlying bug.
        Hide
        Hoss Man added a comment -

        false alarm ... the probably was evidently an old version of ant/junit that didn't know abouthte new @Test based JUnit tests.

        Show
        Hoss Man added a comment - false alarm ... the probably was evidently an old version of ant/junit that didn't know abouthte new @Test based JUnit tests.

          People

          • Assignee:
            Grant Ingersoll
            Reporter:
            Grant Ingersoll
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development