Commits

Raza Ali  committed 82d17e6

Use config file for search index location

  • Participants
  • Parent commits ac0bd04

Comments (0)

Files changed (1)

File src/groovy/net/biomodels/jummp/search/UpdatedRepositoryListener.groovy

 import org.apache.lucene.search.SearcherManager
 import org.apache.lucene.search.SearcherFactory
 import org.apache.lucene.search.IndexSearcher
-
+import org.codehaus.groovy.grails.commons.ApplicationHolder
 /**
  * @short Listener for new revisions and models for indexing
  * 
 
 	IndexWriter indexWriter
 	def modelDelegateService
-	def grailsApplication
+	def grailsApplication = ApplicationHolder.application
 	
 	public UpdatedRepositoryListener() {
-		File location=new File("/home/raza/reps/search")
+		File location=new File(grailsApplication.config.jummp.search.index)
 		location.mkdirs()
 		System.out.println("USING ${location} for directory!")
 		//Create instance of Directory where index files will be stored