I hate to also add:

  6. Use DataImportHandler

It can index Solr XML, and could add field values, either statically or by 
template glue if you need to combine multiple field values somehow.

And in 4.0 you'll be able to use:

  7: scripting update processor

        Erik


On Aug 3, 2012, at 10:51 , Jack Krupansky wrote:

> 1. Google for "XSLT tools".
> 2. Write a script that loads the XML, adds the fields, and writes the updated 
> XML.
> 3. Same as #2, but using Java.
> 4. If the fields are constants, set default values in the schema and then the 
> documents will automatically get those values when added. Take the default 
> value attributes out of the schema once you have input documents that 
> actually have the new field values.
> 5. Hire a consultant.
> 
> -- Jack Krupansky
> 
> -----Original Message----- From: Rajani Maski
> Sent: Friday, August 03, 2012 5:37 AM
> To: solr-user@lucene.apache.org
> Subject: Adding new field before import- using post.jar
> 
> Hi all,
> 
> I have xmls in a folder in the standard solr xml format. I was simply using
> SimplePostTool.java to import these xmls to solr. Now I have to add 3 new
> fields to each document in the xml before doing a post.
> 
> What can be the effective way for doing this?
> 
> 
> Thanks & Regards
> Rajani 

Reply via email to