If you're using a Solr build post-r721758, then copyfield has a maxChars property you can take advantage of. I'm probably misremembering some of the exact names of these elements/attributes, but you can basically have this in your schema.xml:
<field name="f" indexed="true" stored="false" /> <field name="f_for_retrieval" indexed="false" stored="true"/> <copyfield src="f" dest="f_for_retrieval" maxChars="1000000" /> Then anything you store in field f will get copied for storage into f_for_retrieval -- but only up to 1M chars. Here the truncation is done by the field copy. Not sure that there's a way to do it right now without a field copy. On Tue, Jan 27, 2009 at 8:45 PM, Gargate, Siddharth <sgarg...@ptc.com> wrote: > Hi All, > Is it possible to store only limited text in the field, say, max 1 > mb? The field maxfieldlength limits only the number of tokens to be > indexed, but stores complete content. > > Thanks, > Siddharth >