Discussion:
field type=string vs field type=text
chetan
2011-05-12 14:53:50 UTC
Permalink
What is the difference between setting a fields type to string vs setting it
to text.

e.g.
<field name="PATH" type="string" indexed="false" stored="true"/>
or
<field name="PATH" type="text" indexed="false" stored="true"/>



--
View this message in context: http://lucene.472066.n3.nabble.com/field-type-string-vs-field-type-text-tp2932083p2932083.html
Sent from the Solr - User mailing list archive at Nabble.com.
Gora Mohanty
2011-05-12 20:18:37 UTC
Permalink
Post by chetan
What is the difference between setting a fields type to string vs setting it
to text.
e.g.
<field name="PATH" type="string" indexed="false" stored="true"/>
or
<field name="PATH" type="text" indexed="false" stored="true"/>
[...]

Please take a closer look at the fieldType definitions towards the
beginning of the default schema.xml. The "text" type has tokenizers,
and analyzers applied to it, while the "string" type does no processing
of the input data.

Regards,
Gora
Tomás Fernández Löbbe
2011-05-12 21:13:14 UTC
Permalink
Hi, my recommendation: To quickly understand the difference between those
two different field types, index one document using string and text fields,
then facet on those fields and you will see how the terms were indexed.

Using one field type or the other will depend on what you want to do with
that field.
Post by Gora Mohanty
Post by chetan
What is the difference between setting a fields type to string vs setting
it
Post by chetan
to text.
e.g.
<field name="PATH" type="string" indexed="false" stored="true"/>
or
<field name="PATH" type="text" indexed="false" stored="true"/>
[...]
Please take a closer look at the fieldType definitions towards the
beginning of the default schema.xml. The "text" type has tokenizers,
and analyzers applied to it, while the "string" type does no processing
of the input data.
Regards,
Gora
Loading...