An update request processor could do the trick. You can use the stateless
script update processor to code a JavaScript snippet to do whatever logic
you want. Plenty of examples in my e-book:
http://www.lulu.com/us/en/shop/jack-krupansky/solr-4x-deep-dive-early-access-release-7/ebook/product-21203548.html
You can check the list of update processors - there might be one that can be
used to just mutate a specific input value.
Wait... check out the parse boolean processor - you can specify values that
you want turned into particular boolean values:
http://lucene.apache.org/solr/4_9_0/solr-core/org/apache/solr/update/processor/ParseBooleanFieldUpdateProcessorFactory.html
But my book has examples for all these processors, and configuration info as
well.
-- Jack Krupansky
-----Original Message-----
From: abhayd
Sent: Wednesday, August 6, 2014 7:55 PM
To: solr-user@lucene.apache.org
Subject: how to change field value during index time?
hi
I am indexing a csv file using csv handler. I have two fields f1 and f2.
Based on value of f1 i want to set the value of f2. Like if(f1=='T') then
f2=True;
Is this something i can do during index time? I was reading about javascript
transformers but that only seem to work with DIH
Any help?
--
View this message in context:
http://lucene.472066.n3.nabble.com/how-to-change-field-value-during-index-time-tp4151568.html
Sent from the Solr - User mailing list archive at Nabble.com.