Hi Mat,

sounds very interesting, because it seems to be so easy.
You say, that this could comply with Solr's JSON-format.
What are your experiences regarding the differences? I mean, JSON is a standard,
so what can be different?

Thank you!
- Mitch

Am 29.07.2010 09:42, schrieb Mats Bolstad:
If you don't mind your JSON format complying with the one Solr uses,
you could use GSON.

SolrQuery solrQuery = new SolrQuery("your query");
QueryResponse response = server.query(solrQuery);
List beans = response.getBeans(YourObject.class);
// some computing ...
GSON gson = new GSON();
String json = gson.toJSON(beans);

Mats Bolstad


On Wed, Jul 28, 2010 at 1:54 PM, MitchK<mitc...@web.de>  wrote:
Hello community,

I need to transform SolrJ - responses into JSON, after some computing on
those results by another application has finished.

I can not do those computations on the Solr - side.

So, I really have to translate SolrJ's output into JSON.

Any experiences how to do so without writing your own JSON-writer?

Thank you.
- Mitch
--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrJ-Response-JSON-tp1002024p1002024.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to