ниже - мои данные solrDocumentList
{numFound=16,start=0,docs=[SolrDocument{cluster=Horton, source=MUSE}]}
Но при возврате в качестве Json свойство numFound и start игнорируется.
code
// Preparing Solr query
SolrQuery query = new SolrQuery();
query.setQuery(searchString);
// Adding the field to be retrieved
query.addField("*");
query.setStart(start);
query.setRows(rows);
// Executing the query
QueryResponse queryResponse = Solr.query(query);
// Storing the results of the query
SolrDocumentList docs = queryResponse.getResults();
System.out.println("queryResponse is :" + docs);
Solr.close();
return docs;
OutPutОтвет:
[{cluster=Horton, source=MUSE}]
Я ожидаю вывод, как показано ниже, (массив json)
[doc: {cluster=Horton, source=MUSE},
numFound:0
]
Любая помощь приветствуется.