[
https://issues.apache.org/jira/browse/SOLR-7724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14605459#comment-14605459
]
Dawid Weiss commented on SOLR-7724:
-----------------------------------
Hi Alessandro. The code looks o.k. Minor remarks:
- could you format it according to the project's style conventions? There are
numerous offenders, mostly wrt. white spaces around keywords and expressions,
sample blow.
{code}
for( int i=0; i<res.size(); i++ ) {
private List<Cluster> clusters=new LinkedList<Cluster>();
for(NamedList<Object> clusterNode:clusterInfo){
{code}
- It'd be nice to submit patches as SVN diffs rather than IntelliJ's diffs
(which contain additional stuff that may be problematic when merging?).
- I'd change Cluster#docs to Cluster#docIds which is more explicit.
- Don't know if it's possible but ideally I'd like the test to parse an actual
output from the clustering handler... this way you could avoid having a
hardcoded response which may go out of sync with the actual response.
Shamefully I haven't kept track with solrj development recently so you'd need
to dig the code and see if this is at all doable. If not, so be it, we'll live
with the hardcoded response.
> Clustering Component results parsing
> ------------------------------------
>
> Key: SOLR-7724
> URL: https://issues.apache.org/jira/browse/SOLR-7724
> Project: Solr
> Issue Type: Improvement
> Components: SolrJ
> Affects Versions: 5.2.1
> Reporter: Alessandro Benedetti
> Assignee: Dawid Weiss
> Priority: Minor
> Labels: clustering, clusters, queryResponse
> Attachments: SOLR-7724.patch, SOLR-7724.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently SolrJ org.apache.solr.client.solrj.response.QueryResponse is not
> managing clusters coming from the Clustering Component .
> It would be nice to have the clusters properly managed and returned with
> simply getter methods.
> Current Json :
> "clusters":[{
> "labels":["label1"],
> "score":14.067292538482793,
> "docs":["id1",
> "id2",
> "id3"]
> },
> {
> "labels":["label2"],
> "score":16.932201244715046,
> "docs":["id1",
> "id2",
> "id3"]}]}
> This will be parsed accordingly .
> Producing an easy to use Java List.
> Clusters
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]