When Solr is used in the context of a specific requirement; for example, a log search for an enterprise application, it holds a specific schema, which can be defined in schema.xml
and copied over to nodes. The schema plays a vital role in the performance of your Solr instance, because based on the schema, attributes are indexed.
In schema.xml
of Solr configuration, the system allows you to specify the <defaultSearchField>
parameter. This is the parameter that controls when you search without an explicit field name in your query, which field to pick up for searching. This is an optional parameter, if this is not specified, for all of the queries that are not providing the field name, search will run them on all of the available fields in the schema. This will not only consume more CPU time, but overall slow down the search performance.