You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by chetan <gu...@gmail.com> on 2011/05/12 16:53:50 UTC
field type=string vs field type=text
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.
Re: field type=string vs field type=text
Posted by Tomás Fernández Löbbe <to...@gmail.com>.
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.
On Thu, May 12, 2011 at 5:18 PM, Gora Mohanty <go...@mimirtech.com> wrote:
> On Thu, May 12, 2011 at 8:23 PM, chetan <gu...@gmail.com> wrote:
> > 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
>
Re: field type=string vs field type=text
Posted by Gora Mohanty <go...@mimirtech.com>.
On Thu, May 12, 2011 at 8:23 PM, chetan <gu...@gmail.com> wrote:
> 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