[Previous: Terrier Components] [Contents] [Next: Configuring Indexing]

Configuring Terrier

Configuring Overview

Terrier is configured overall by a few files, all in the etc/ directory. The most central files are terrier.properties and terrier-log.xml. In terrier.properties, you can specify any of the various properties that are defined in Terrier. The Properties documentation page lists the most used properties that you need to configure Terrier, while the javadoc for any class lists the properties that directly affect the class. The default terrier.properties file is given below:

#default controls for query expansion

#default and allowed controls

#document tags specification
#for processing the contents of
#the documents, ignoring DOCHDR

#query tags specification

#stop-words file

#the processing stages a term goes through

In the terrier.properties file, properties are specified in the format name=value (the default Java Properties format). Comments are lines starting with #.

Scripting Properties

TrecTerrier supports specifying properties on the command line. This allows the easy over-riding of properties, even if they are specified in the etc/terrier.properties file. For example, to create an index without using a stemmer, you could use the command line:

[user@machine]$ bin/trec_terrier.sh -i -Dtermpipelines=Stopwords

Aside: When looking for properties, Terrier also checks the System properties provided by Java. This means that you can set a property anywhere within Java code, or on the Java command line.

As another example, you can use shell scripting (e.g. Bash) to run Terrier with many settings for the expansion.terms property of query expansion:

[user@machine]$ for((i=2;i<10;i++)); do 
	bin/trec_terrier.sh -r -q -Dexpansion.terms=$i 

Configuring Logging

Terrier uses Log4j for logging. You can control the amount of logging information (the logging level) that Terrier outputs by altering the log4j config in etc/terrier-log.xml. For more information about configuring Log4j, see the Log4j documentation.

[Previous: Terrier Components] [Contents] [Next: Configuring Indexing]