Versions Compared

Key

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

...

For a presentation about AJAX I have modified DSpace 1.3 so all search fields have autosuggest capability like Google suggest (http://www.google.com/webhp?complete=1&hl=en)

...

When the user starts to type in a search field (excluding advance search) a list of suggestions is displayed beneath the search field. This list contains the number of hits for the current collection and the number of hits and suggestions for a specific index, for example the author or title index. The user can select an item from this dropdown list to immediately search for that term in that index.

Try it at

A demo version is available at: http://dspacetest.leidenuniv.nl/dspaceFor example start typing 'peter' or 'auto' or 'suggest'

How it works

Via Javascript an event handler for the keydown event is attached to all input fields with name 'query'. When something is typed in such an input field multiple AJAX http request are sent asynchronously to dspace. An AjaxSearchServlet handles those request and sends results back using JSON. Via javascript these results are displayed using the DOM in a dropdown list.
Which indexes are used and how many results are displayed is configurable.

...