Ignore:
Timestamp:
Jun 2, 2010, 4:31:17 PM (14 years ago)
Author:
gav
Message:

Install searchable plugin, configure and start inventory search.

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

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Asset.groovy

    r456 r562  
    3030    }
    3131
     32    static searchable = {
     33        root false // only index as a component of InventoryItem.
     34        only = ['name', 'description', 'comment']
     35    }
     36
    3237    //  This additional setter is used to convert the checkBoxList string or string array
    3338    //  of ids selected to the corresponding domain objects.
  • trunk/grails-app/domain/InventoryItem.groovy

    r484 r562  
    6161    String toString() {"${this.name}"}
    6262
     63    static searchable = {
     64        only = ['name', 'description', 'comment', 'inventoryLocation', 'spareFor']
     65        //name boost: 1.5
     66        inventoryLocation component: true
     67        spareFor component: true
     68    }
     69
    6370    def afterInsert = {
    6471        addReverseAlternateItems()
  • trunk/grails-app/domain/InventoryLocation.groovy

    r389 r562  
    1616        "${this.name}"
    1717    }
     18
     19    static searchable = {
     20        root false // only index as a component of InventoryItem.
     21        only = ['name']
     22    }
     23
    1824}
Note: See TracChangeset for help on using the changeset viewer.