Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Look for this line in dspace.cfg: ##### Fields to Index for Search #####
  2. Beneath it you will see several lines like this:

    Code Block
    search.index.1 = author:dc.contributor.*
    search.index.2 = author:dc.creator.*
    search.index.3 = title:dc.title.*
    search.index.4 = keyword:dc.subject.* 
    search.index.5 = abstract:dc.description.abstract


  3. Add another search.index.# line to the bottom. If you just want to add a different Dublin Core (dc) field to one of the existing "named indices", use the models above as a guide. If you wish to specify a different metadata schema, replace dcwith the other metadata schema's name.
    • The "name" to the left of the colon (e.g. author, title, keyword, etc) is important. In the above example, a search on "author" is specified to search all Dublin Core (dc) contributor}} and {{creator fields. Whereas, a search on "abstract" only searches the dc.description.abstract field.
  4. If you want to add an entirely new search field, you will also have to modify Messages.properties (see Change page text (JSP) ) to add a user-friendly label for it, and the advanced-search JSP (advanced.jsp) to add an appropriate <option>element, as below:

    Code Block
    <option value="author" <%= field1.equals("author") ? "selected=\"selected\"" : "" %>><fmt:message key="jsp.search.advanced.type.author"/></option>
    • The "value" attribute of your <option> element should correspond to the name of one of your search indices (e.g. author, title, keyword, etc.)
  5. Perform the steps in Re-index DSpace .
  6. Perform the steps in Rebuild DSpace .

...