Re: Inserting a field in the json doc before indexing

2011-12-20 Thread Dipti Srivastava
Thanks for responding. Both options seem good. For now I just need to manipulate the JSON string I get and add a special field to it which I will later on use for my searches. I am going with the approach of using a JSONObject and converting it back to string. Dipti On 12/20/11 10:32 AM, "Erick Er

Re: Inserting a field in the json doc before indexing

2011-12-20 Thread Erick Erickson
The other option is to write custom update handler that injected the data, a lot depends on whether you want to put the load on the server or client. Best Erick On Mon, Dec 19, 2011 at 1:35 PM, Anuj Kumar wrote: > Hi Dipti, > > If you are receiving the JSON within your Java code, you can try an

Re: Inserting a field in the json doc before indexing

2011-12-19 Thread Anuj Kumar
Hi Dipti, If you are receiving the JSON within your Java code, you can try any library, like- GSON [1] to manipulate JSON before sending it to Solr. - Anuj 1. http://code.google.com/p/google-gson/ On Mon, Dec 19, 2011 at 11:54 PM, Dipti Srivastava < dipti.srivast...@apollogrp.edu> wrote: > Hi,

Inserting a field in the json doc before indexing

2011-12-19 Thread Dipti Srivastava
Hi, I am using HTTP and json to add my documents to Solr. Now, I have defined a special field in the Solr schema which defines what type of document that is being added. This field needs to be inserted into the json doc that I receive from my caller. Is there a way to do this? Thanks! Dipti __