Install Solr on Ubuntu
sudo apt-get -y install solr-tomcat
Then go to your admin portal:
http://<Your-IP>:8080/solr/admin/
sudo nano /etc/solr/conf/solrconfig.xml
sudo nano /etc/solr/conf/schema.xml
<dataDir> : Data Directory Used to specify an alternate directory to hold all index data other than the default ./data under the Solr home. If replication is in use, this should match the replication configuration.
<!– Commit Deletion Policy
Custom deletion policies can be specified here. The class must
implement org.apache.lucene.index.IndexDeletionPolicy.
http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/index/IndexDele$
The default Solr IndexDeletionPolicy implementation supports
deleting index commit points on number of commits, age of
commit point and optimized status.
The latest commit point should always be preserved regardless
of the criteria.
–>
<!–
<deletionPolicy class=”solr.SolrDeletionPolicy”>
–>
<!– The number of commit points to be kept –>
<!– <str name=”maxCommitsToKeep”>1</str> –>
<!– The number of optimized commit points to be kept –>
<!– <str name=”maxOptimizedCommitsToKeep”>0</str> –>
<!–
Delete all commit points once they have reached the given age.
Supports DateMathParser syntax e.g.
–>
<!–
<str name=”maxCommitAge”>30MINUTES</str>
<str name=”maxCommitAge”>1DAY</str>
–>
<!–
</deletionPolicy>
–>
<!– Result Window Size
An optimization for use with the queryResultCache. When a search
is requested, a superset of the requested number of document ids
are collected. For example, if a search for a particular query
requests matching documents 10 through 19, and queryWindowSize
is 50, then documents 0 through 49 will be collected and cached.
Any further requests in that range can be satisfied via the cache.
–>
<queryResultWindowSize>50</queryResultWindowSize>