Contribute to the DSpace Development Fund
The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.
Files:
- dspace/config/dspace.cfg
- dspace-source/jsp/local/search/advanced.jsp
- dspace-source/config/language-packs/Messages.properties
Instructions:
- Look for this line in dspace.cfg: ##### Fields to Index for Search #####
- Beneath it you will see several lines like this:
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
- Add another search.index.# line to the bottom. If you just want to add a different Dublin Core (
) 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
dc
with the other metadata schema's name.dc
- 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
andcontributor
fields. Whereas, a search on "abstract" only searches thecreator
field.dc.description.abstract
- 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 (
- If you want to add an entirely new search field, you will also have to modify Messages.properties (see Change+page+text) to add a user-friendly label for it, and the advanced-search JSP (advanced.jsp) to add an appropriate
element, as below:
<option>
<option value="author" <%= field1.equals("author") ? "selected=\"selected\"" : "" %>><fmt:message key="jsp.search.advanced.type.author"/></option>
- The "value" attribute of your
element should correspond to the name of one of your search indices (e.g. author, title, keyword, etc.)
<option>
- The "value" attribute of your
- Perform the steps in Re-index+DSpace.
- Perform the steps in Rebuild+DSpace.
Notes:
- In DSpace, the most confusing concept regarding search fields is the keyword search.
- In the basic search boxes (as seen below), any terms entered are searched for anywhere within any of the search indices (i.e. any of the
fields in dspace.cfg), or the full text of the document (if it is full-text indexable). These search boxes perform what most refer to as a keyword or keyterm search.
search.index.#
- However, to make things a little confusing, you'll notice a keyword search index listed in dspace.cfg:
This (rather inappropriately named) index is actually used during subject specific searches (hence the
search.index.4 = keyword:dc.subject.*
). It does not have any control over a normal keyword search that is run from the basic search box in DSpace.subject.*
Overview
Content Tools