FAQ

Q.What is dynamicField?

A.

In Apache Solr's managed-schema.xml, setting a field as a dynamicField allows flexibility in field names. Let's explain with a specific example. Suppose you set up the following dynamicField in managed-schema.xml:

   <dynamicField name="*_s"   type="string"  indexed="true"  stored="true" />
   <dynamicField name="*_sm"  type="string"  indexed="true"  stored="true" multiValued="true"/>

The field name (specified by 'name') of a dynamicField must always include one asterisk(*) as shown above (the field name is specified to start or end with an asterisk). Then, suppose you specify the field name as follows during searching or indexing:

(Specifying a query expression in the q parameter during searching)
q=domain_s:kandasearch.com

By doing this, in Apache Solr, even if there is no field specification like domain_s, since the first setting of dynamicField name="*_s" matches by pattern matching, it will be interpreted as a string type with indexed="true" and stored="true".

Similarly, by performing the following search, it will interpret tags_sm as a string type with multiple values:

(Specifying a query expression in the q parameter during searching)
q=tags_sm:colorful OR tags_sm:cool

For estimates and details,
please feel free to contact our development team.

Contact Us
TOP