Changeset 622 for trunk/grails-app/conf


Ignore:
Timestamp:
Jul 10, 2010, 10:48:50 PM (14 years ago)
Author:
gav
Message:

Apply bug fix for ticket #76.
Rename all instances of Lucene to Searchable.
Improved global directory config.
Add log levels for searchable plugin and compass.

Location:
trunk/grails-app/conf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r571 r622  
    1616                createDataService.createBaseData()
    1717                createDataService.createDemoData()
    18                 createDataService.startLucene()
     18                createDataService.startSearchableIndex()
    1919            }
    2020            test {
     
    2222                createDataService.ensureSystemAndAdminAccess()
    2323                createDataService.createBaseData()
    24                 createDataService.startLucene(false)
     24                createDataService.startSearchableIndex(false)
    2525            }
    2626            production {
     
    2828                createDataService.ensureSystemAndAdminAccess()
    2929                createDataService.createBaseData()
    30                 createDataService.startLucene()
     30                createDataService.startSearchableIndex()
    3131            }
    3232        }
  • trunk/grails-app/conf/Config.groovy

    r608 r622  
    4949grails.spring.bean.packages = []
    5050
     51/**
     52* Internal searchable index config.
     53*/
     54// Is set true by createDataService.startSearchableIndex() once bootstrap completes.
     55appSearchable.cascadeOnUpdate = false
     56
     57/**
     58* Directory configuration.
     59* Pickup the Tomcat/Catalina directory else use the target or current dir.
     60*/
     61def fs = File.separator // Local variable.
     62globalDirs.targetDir = new File("target${fs}").isDirectory() ? "target${fs}" : ''
     63globalDirs.catalinaBase = System.properties.getProperty('catalina.base')
     64globalDirs.logDirectory = globalDirs.catalinaBase ? "${globalDirs.catalinaBase}${fs}logs${fs}" : globalDirs.targetDir
     65globalDirs.workDirectory = globalDirs.catalinaBase ? "${globalDirs.catalinaBase}${fs}work${fs}" : globalDirs.targetDir
     66globalDirs.searchableIndexDirectory = "${globalDirs.workDirectory}SearchableIndex${fs}${appName}${fs}"
    5167
    5268/**
     
    5874 * Basic log levels are ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF
    5975 */
    60 // Pickup the Tomcat/Catalina work directory else use the current or temp dir.
    61 def catalinaBase = System.properties.getProperty('catalina.base')
    62 def fs = File.separator
    63 def logDirectory = catalinaBase ? "${catalinaBase}${fs}logs${fs}" : ''
    6476
    6577log4j = {
     
    7385        // Custom log file.
    7486        rollingFile name:"appLog",
    75                         file:"${logDirectory}${appName}.log".toString(),
     87                        file:"${globalDirs.logDirectory}${appName}.log".toString(),
    7688                        maxFileSize:'300kB',
    7789                        maxBackupIndex:1,
     
    99111    error 'grails.app.service.NavigationService'
    100112    error 'grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService'
     113    info 'org.codehaus.groovy.grails.plugins.searchable'
     114    //info 'org.compass'
    101115    error 'grails.app.task' // Quartz jobs.
    102     info 'grails.app.task.InventoryReindexJob'
     116    info 'grails.app.task.InventoryIndexJob'
    103117
    104118    // Move anything that should behave differently into this section.
  • trunk/grails-app/conf/Searchable.groovy

    r598 r622  
     1import org.codehaus.groovy.grails.commons.ConfigurationHolder
     2
    13/**
    24 * This {@link groovy.util.ConfigObject} script provides Grails Searchable Plugin configuration.
     
    2628
    2729    /**
    28      * The location of the Compass index
    29      *
    30      * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default
    31      *
    32      * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
    33      */
    34     // Pickup the Tomcat/Catalina work directory else use the current or temp dir.
    35     def catalinaBase = System.properties.getProperty('catalina.base')
    36     def fs = File.separator
    37     def indexDirectory = catalinaBase ? "${catalinaBase}${fs}work${fs}Lucene${fs}" : "Lucene${fs}"
    38 
    39     compassConnection = new File("${indexDirectory}${appName}").absolutePath
     30    * The location of the Compass index
     31    *
     32    * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default
     33    *
     34    * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
     35    */
     36    compassConnection = new File(ConfigurationHolder.config.globalDirs.searchableIndexDirectory).absolutePath
    4037
    4138    /**
Note: See TracChangeset for help on using the changeset viewer.