Versions Compared

Key

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

Change the fields listed in your DSpace Advanced Search

...

options

Info
titleIn this section you will learn you to add or remove fields on the advanced search page. You will need to edit the files dspace.cfg and message.xml then reindex and restart DSpace
Table of Contents
minLevel2

Add/Remove Advanced Search fields in dpsace.cfg

...

Open dspace.cfg and find the heading "##### Fields to Index for Search #####"    Scrolling down you will see uncommented lines that read " search.index.1 =..." this is where you will edit and add lines.   Image Added

Wiki Markup
   !Screen shot 2012-03-26 at 2.58.01 PM.png|border=1!
The search commands are written as "search.index.# = \[name\]:\[schema\].\[element\].\[qualifier\]"

  • The name section is used to group together fields within advanced search, for example the name "author" is used three times for the fields dc.contributor, dc.creator, and dc.description.statementofresponsibility- when a user does an advanced search by author all three fields will be searched.
  • Qualifiers can be replaced with "" '' and all occurrences that element will be searched regardless of qualifiers, for example "dc.title." indexes both dc.title and dc.title.alternative.

Remove any fields you do want as part of the advanced search and add any additional fields.  In this example I I have added the field dc.subject.classification with the name "department" and the field dc.coverage.* with the name "location." Image Added

Add Headings to message.xml

Wiki Markup
Open message.xml and find the heading <\!-\- org.dspace.app.xmlui.artifactbrowser.AdvancedSearch.java \-->.&nbsp; For each Advance Search category you added in dspace.cfg, you will need to add a new message field.&nbsp; The message field should be written as <message key="xmlui.ArtifactBrowser.AdvancedSearch.type_\[name\]">\[Search Heading\]</message>.&nbsp; The key refers to the name you used in dspace.cfg and the element contents are the heading for the Advanced Search function. !Screen shot 2012-03-27 at 8.58.59 AM.png|border=1!

Re-index and Restart DSpace

Before existing items can be searched or browsed you need to re-index you your instance. 

Navigate to cd /usr/local/dspace/bin then type"./dspace index-init".  After your index has you have finished indexing, restart DSpace.

Panel

This section was contributed by Catalina Oyler from the Five Colleges of Ohio