Solr schema and solrconfig xml structure

schema.xml and solrconfig.xml files are two main Solr configuration files that lives in the conf folder of your Solr instance. solrconfig.xml defines the behaviour of Solr as it indexes content and responds to queries. schema.xml defines the data types of the fields you have in a document. Other configuration files can be created and place any where as long as it is referenced correctly in these two main configurating files. The locaion of these two files for the out of box Solr example of Solr 4.10 are

apache-solr-4.10.0/solr/example/solr/collection1/conf/schema.xml
apache-solr-4.10.0/solr/example/solr/collection1/conf/solrconfig.xml

schema.xml structure

<schema name="solr-example" version="0.1">
	<types>
		<fieldType>
			<analyzer>
				<tokenizer/>
				<filter/>
			</analyzer>
		</fieldType>
	</types>
	<fields>
        <field/>
        <dynamicField/>
	</fields>
	<uniqueKey>unique</uniqueKey>
	<defaultSearchField>name</defaultSearchField>
	<solrQueryParser defaultOperator="AND"/>
	<copyField/>
</schema>

solrconfig.xml structure

<config>
	<abortOnConfigurationError/>
	<lib/>
	<dataDir/>
	<indexDefaults/>
	<mainIndex/>
	<jmx/>
	<updateHandler/>
	<query/>
	<requestDispatcher/>
	<requestHandler/>
	<searchComponent/>
	<highlighting/>
	<queryResponseWriter/>
	<admin/>
</config>

Search within Codexpedia

Custom Search

Search the entire web

Custom Search