11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The HTMLStripTransformer<br />

You can use this transformer to strip HTML out of a field. For example:<br />

<br />

<br />

...<br />

<br />

There is one attribute for this transformer, stripHTML, which is a boolean value (true/false) to signal if the<br />

HTMLStripTransformer should process the field or not.<br />

The LogTransformer<br />

You can use this transformer to log data to the console or log files. For example:<br />

<br />

....<br />

<br />

Unlike other transformers, the LogTransformer does not apply to any field, so the attributes are applied on the<br />

entity itself.<br />

The NumberFormatTransformer<br />

Use this transformer to parse a number from a string, converting it into the specified format, and optionally using<br />

a different locale.<br />

NumberFormatTransformer will be applied only to fields with an attribute formatStyle.<br />

This transformer recognizes the following attributes:<br />

Attribute<br />

formatStyle<br />

sourceColName<br />

locale<br />

Description<br />

The format used for parsing this field. The value of the attribute must be one of (number|p<br />

ercent|integer|currency). This uses the semantics of the Java NumberFormat class.<br />

The column on which the NumberFormat is to be applied. This is attribute is absent. The<br />

source column and the target column are the same.<br />

The locale to be used for parsing the strings. If this is absent, the ROOT locale is used. It<br />

must be specified as language-country. For example, en-US.<br />

For example:<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

223

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!