[ 
https://issues.apache.org/jira/browse/SOLR-12965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16690940#comment-16690940
 ] 

ASF subversion and git services commented on SOLR-12965:
--------------------------------------------------------

Commit b27bcc859580edff5ce07613e18308edadb88f4c in lucene-solr's branch 
refs/heads/branch_7x from [~gerlowskija]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b27bcc8 ]

SOLR-12981: Introduce SolrJ type for JSON facet response parsing

Recent JIRA's (SOLR-12947, SOLR-12965) have added support making it
easier to compose JSON query/faceting requests using SolrJ.  But neither
made parsing the responses to these queries any easier.

This commit introduces NestableJsonFacet (along with several companion
types) which are Java representations of the JSON faceting response.
They can be accessed via the new QueryResponse method:
`getJsonFacetingResponse()`.


> Add JSON faceting support to SolrJ
> ----------------------------------
>
>                 Key: SOLR-12965
>                 URL: https://issues.apache.org/jira/browse/SOLR-12965
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java, SolrJ
>    Affects Versions: 7.5, master (8.0)
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Major
>         Attachments: SOLR-12965.patch, SOLR-12965.patch, SOLR-12965.patch, 
> SOLR-12965.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to