User search.pl
Revision as of 09:03, 31 January 2022 by Drn@ecs.soton.ac.uk (talk | contribs) (Added page about config file)
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
user_search.pl contains configuration for the search on user data objects, which can be found under the Search users in the Editorial tools tab of the Admin menu. This configuration is stored under $c->{search}->{user}
hash reference. This contains the following parts:
search_fields
- The fields that the user search will query.citation
- The citation format for items in the results page of user search.page_size
- The number of results that should appear per page.order_methods
- Ordering options provided at the top of the user search results page.default_order
- The default order search results will appear for user search.show_zero_results
- Should the user search go to the results page if there are no results of stay on the search form page with a warning about no results.
Example
$c->{search}->{user} ={ search_fields => [ { meta_fields => [ "name", ] }, { meta_fields => [ "username", ] }, { meta_fields => [ "userid", ] }, { meta_fields => [ "dept","org" ] }, { meta_fields => [ "address","country", ] }, { meta_fields => [ "usertype", ] }, { meta_fields => [ "email" ] }, ], citation => "result", page_size => 20, order_methods => { "byname" => "name/joined", "byjoin" => "joined/name", "byrevjoin" => "-joined/name", "bytype" => "usertype/name", }, default_order => "byname", show_zero_results => 1, };