Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-484

Ensure that the property terrier.home is specified in the file terrier.properties, or as a system property in the command line

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 4.2
    • Fix Version/s: None
    • Component/s: .indexing, build
    • Labels:
      None

      Description

      Hi everyone,

      I went through the terrier quickstart tutorial corpus and then I run the code below:

      import java.util.Arrays;
      import org.terrier.indexing.Collection;
      import org.terrier.indexing.SimpleFileCollection;
      import org.terrier.structures.indexing.Indexer;
      import org.terrier.structures.indexing.classical.BasicIndexer;
      import org.terrier.utility.ApplicationSetup;

      public class IndexingExample {

          public static void main(String[] args) throws Exception {
              // TODO Auto-generated method stub

              // Directory containing files to index
                  String aDirectoryToIndex = "/home/nadhem/PFE/terrier-core-4.2/share/vaswani_npl/corpus/";

              // Configure Terrier
                  ApplicationSetup.setProperty("terrier.home", "/home/nadhem/PFE/terrier-core-4.2");

                  Indexer indexer = new BasicIndexer("/home/nadhem/PFE/terrier-core-4.2/var/index", "data");
                  Collection coll = new SimpleFileCollection(Arrays.asList(aDirectoryToIndex), true);
                  indexer.index(new Collection[]{coll});
          }

      }

      I got the following error:

      WARNING: The file terrier.properties was not found at location /etc/terrier.properties Assuming the value of terrier.home from the corresponding system property. Please ensure that the property terrier.home is specified in the file terrier.properties, or as a system property in the command line.

      I didn't understand why the properties file was not found despite having checked it...there is another

      Any help would be most appreciated.

      thanks,
      Nadhem7

        Attachments

          Activity

          Hide
          craigm Craig Macdonald added a comment -

          Hi Nadhem7,
          I have replied to you on the forum. I dont think there is a bug there. "Assuming the value of terrier.home from the corresponding system property" is fairly clear.

          Show
          craigm Craig Macdonald added a comment - Hi Nadhem7, I have replied to you on the forum. I dont think there is a bug there. "Assuming the value of terrier.home from the corresponding system property" is fairly clear.

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              nadhem7 nadhem lamine
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: