lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <>
Subject Schema API: add-field-type
Date Wed, 29 Apr 2015 22:50:26 GMT
Hi Everyone,

When I pass the following:

I see this (as one example):

    <str name="name">date</str>
    <str name="class">solr.TrieDateField</str>
    <str name="precisionStep">0</str>
    <str name="positionIncrementGap">0</str>
    <arr name="fields">
    <arr name="dynamicFields">

See how there is "fields" and "dynamicfields"?  However, when I look in
schema.xml, I see this:

  <fieldType name="date" class="solr.TrieDateField" precisionStep="0"

See how there is nothing about "fields" and "dynamicfields".

Now, when I look further into the schema.xml, I see they are coming from:

  <field name="last_modified" type="date" indexed="true" stored="true"/>
  <dynamicField name="*_dt"  type="date"    indexed="true"  stored="true"/>
  <dynamicField name="*_dts" type="date"    indexed="true"  stored="true"

So it all makes sense.

Does this means the response of "fieldtypes" includes "fields" and
"dynamicfields" as syntactic-sugar to let me know of the relationship this
field-type has or is there more to it?

The reason why I care about this question is because I'm using Solr's
Schema API (see:
to make changes to my schema.  Per this link:
it shows how to add a field-type via "add-field-type" but there is no
mention of "fields" or "dynamicfields" in this API.  My assumption is
"fields" and "dynamicfields" need not be part of this API, instead it is
done via "add-field" and "add-dynamic-field", thus what I see in the XML of
"fieldtypes" response is just syntactic-sugar.  Did I get all this right?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message