When you apply your analyzers/filters/tokenizers, the result value is kept in the indexed; however, the input value is actually stored. For example, from schema.xml file:
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer> <charFilter class="solr.HTMLStripCharFilterFactory"/> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> This particular field type will strip out the HTML. So if the input is: <b>Hello</b> It's being tokenized in the index as Hello It's being stored (and hence returned to you) as <b>Hello</b> So you can create your own charFilter or filter class which converts your date for the indexer, but the original data will "automatically" be stored. I hope this makes sense. -----Original Message----- From: jefferyyuan [mailto:yuanyun...@gmail.com] Sent: Monday, December 10, 2012 10:24 AM To: solr-user@lucene.apache.org Subject: Re: Is there a way to round data when index, but still able to return original content? Erick, Thanks for your reply. I know how to implement the solution 1. But no idea how yo implement the solution 2 you mentioned: ===> If you put some sort of (perhaps custom) filter in place, then the original value would go in as stored and the altered value would get in the index and you could do both in the same field. Can you please describe more about how to store original data and index the altered value in the same filed? Thanks :) -- View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-round-data-when-index-but-still-able-to-return-original-content-tp4025405p4025695.html Sent from the Solr - User mailing list archive at Nabble.com.