Re: Adding new field before import- using post.jar

2012-08-04 Thread Lance Norskog
--Original Message- From: Rajani Maski > Sent: Saturday, August 04, 2012 2:23 PM > To: solr-user@lucene.apache.org > Subject: Re: Adding new field before import- using post.jar > > > They are coming from text file. > > SolrXML input documents are xmls in folder location. (

Re: Adding new field before import- using post.jar

2012-08-04 Thread Jack Krupansky
Sounds like a perl script would be sufficient. -- Jack Krupansky -Original Message- From: Rajani Maski Sent: Saturday, August 04, 2012 2:23 PM To: solr-user@lucene.apache.org Subject: Re: Adding new field before import- using post.jar They are coming from text file. SolrXML input

Re: Adding new field before import- using post.jar

2012-08-04 Thread Rajani Maski
They are coming from text file. SolrXML input documents are xmls in folder location. (To import these xmls, I was using simple post.jar) Now, for each xml there is need to add 3 external new fields reading values from text file. Regards Rajani On Sat, Aug 4, 2012 at 10:59 PM, Jack Krupansky wro

Re: Adding new field before import- using post.jar

2012-08-04 Thread Jack Krupansky
Where are the values of the three new fields coming from? Are they constant/default values? Computed from other fields in the XML? From other XML files? From a text file? From a database? Or where? So, given a specific Solr XML input document, how will you be accessing the three field values

Re: Adding new field before import- using post.jar

2012-08-04 Thread Rajani Maski
Thank you for the reply. 8.How about Extending class : XmlUpdateRequestHandler? Is it possible and good method? Regards Rajani On Fri, Aug 3, 2012 at 8:32 PM, Erik Hatcher wrote: > I hate to also add: > > 6. Use DataImportHandler > > It can index Solr XML, and could add field values, e

Re: Adding new field before import- using post.jar

2012-08-03 Thread Erik Hatcher
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:

Re: Adding new field before import- using post.jar

2012-08-03 Thread Jack Krupansky
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