[jira] [Commented] (SOLR-12947) SolrJ Helper for JSON Request API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (SOLR-12947) SolrJ Helper for JSON Request API

JIRA jira@apache.org

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

Jason Gerlowski commented on SOLR-12947:

bq. The standard name is TestJsonQueryRequest, this name JsonQueryRequestUnitTest is quite uncommon
Yep, true enough, but I did have reasons for the name.  I chose that name with some of the recent test-improvement JIRAs in mind.

In SOLR-12939 there's been recent movement towards aligning on a test-naming standardization.  By my reading of the comments there {{TestFoo}} is the majority in our codebase, but {{FooTest}} is more standard across Java projects as a whole and seemed to be the winner in the discussion so far.  So I went with {{FooTest}}.

In SOLR-12921 Mark/David/Erick discussed separating unit and integration tests either by name or package.  To make their job in that JIRA the littlest bit easier I included "Unit" and "Integration" in my test names.  Even if nothing ever happens with SOLR-12921 though, JsonQueryRequest still has two test classes (one unit, the other integration).  The class names need to be different, so if you don't like having "Unit"/"Integration" in the names, is there another disambiguating word you'd prefer?

Despite those reasons, I'm not strongly attached to the choice in any way.  If you care about it, I'm happy to rename.

bq. use computeIfAbsent()
Cool, hadn't seen this much before.  Will do.

> SolrJ Helper for JSON Request API
> ---------------------------------
>                 Key: SOLR-12947
>                 URL: https://issues.apache.org/jira/browse/SOLR-12947
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: clients - java, SolrJ
>    Affects Versions: 7.5
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Minor
>         Attachments: SOLR-12947.patch, SOLR-12947.patch, SOLR-12947.patch
> The JSON request API is becoming increasingly popular for sending querying or accessing the JSON faceting functionality. The query DSL is simple and easy to understand, but crafting requests programmatically is tough in SolrJ. Currently, SolrJ users must hardcode in the JSON body they want their request to convey.  Nothing helps them build the JSON request they're going for, making use of these APIs manual and painful.
> We should see what we can do to alleviate this.  I'd like to tackle this work in two pieces.  This (the first piece) would introduces classes that make it easier to craft non-faceting requests that use the JSON Request API.  Improving JSON Faceting support is a bit more involved (it likely requires improvements to the Response as well as the Request objects), so I'll aim to tackle that in a separate JIRA to keep things moving.

This message was sent by Atlassian JIRA

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