Truncating the index size
You might come across situations where you need to truncate the index size to such an extent that it fits into your system's RAM. We will learn how to truncate the index size to a desirable level in this section.
Let us consider our music composition eStore
for the demonstration purposes. Assuming that we have four fields that describe the document, we will add the following index structure to the fields
section of our schema.xml
file:
<field name="wm_id" type="string" indexed="true" stored="true" required="true" /> <field name="wm_name" type="text" indexed="true" stored="true" /> <field name="wm_details" type="text" indexed="true" stored="true" /> <field name="wm_price" type="string" indexed="true" stored="true" />
We will also assume the following points:
Search is to be carried out in the
wm_name
andwm_details
fieldsWe show the
wm_id
andwm_price
fieldsWe restrict Solr from using spellchecker and highlighting
We indexed 2,000,000 example documents...