Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12965

Add JSON faceting support to SolrJ

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.5, 8.0
    • 7.7, 8.0
    • clients - java, SolrJ
    • None

    Description

      SOLR-12947 created JsonQueryRequest, a SolrJ class that makes it easier for users to make JSON-api requests in their Java/SolrJ code. Currently this class is missing any sort of faceting capabilities (I'd held off on adding this as a part of SOLR-12947 just to keep the issues smaller).

      This JIRA covers adding that missing faceting capability.

      There's a few ways we could handle it, but my first attempt at adding faceting support will probably have users specify a Map<String, Object> for each facet that they wish to add, similar to how complex queries were supported in SOLR-12947. This approach has some pros and cons:

      The benefit is how general the approach is- our interface stays resilient to any future changes to the syntax of the JSON API, and users can build facets that I'd never thought to explicitly test. The downside is that this doesn't offer much abstraction for users who are unfamiliar with our JSON syntax- they still have to know the JSON "schema" to build a map representing their facet. But in practice we can probably mitigate this downside by providing "facet builders" or some other helper classes to provide this abstraction in the common case.

      Hope to have a skeleton patch up soon.

      Attachments

        1. SOLR-12965.patch
          140 kB
          Jason Gerlowski
        2. SOLR-12965.patch
          140 kB
          Jason Gerlowski
        3. SOLR-12965.patch
          127 kB
          Jason Gerlowski
        4. SOLR-12965.patch
          63 kB
          Jason Gerlowski

        Activity

          People

            gerlowskija Jason Gerlowski
            gerlowskija Jason Gerlowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: