Difference between revisions of "Search.pl"

From EPrints Documentation
Jump to: navigation, search
(Advanced Search)
(Added page about config file)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Simple Search=
+
{{dirs}}
+
{{cfgd}}
$c->{search}->{simple} = {
 
        search_fields => [
 
                {
 
                        id => "q",
 
                        meta_fields => [
 
                                $EPrints::Utils::FULLTEXT,
 
                                "title",
 
                                "abstract",
 
                                "creators_name",
 
                                "date"
 
                        ]
 
                },
 
        ],
 
        preamble_phrase => "cgi/search:preamble",
 
        title_phrase => "cgi/search:simple_search",
 
        citation => "result",
 
        page_size => 20,
 
        order_methods => {
 
                "byyear"        => "-date/creators_name/title",
 
                "byyearoldest"  => "date/creators_name/title",
 
                "byname"        => "creators_name/-date/title",
 
                "bytitle"        => "title/creators_name/-date"
 
        },
 
        default_order => "byyear",
 
};
 
  
=Advanced Search=
+
'''search.pl''' contains generic configution for search.  Specific configuration for individual searches exist in their own configuration files:
 +
* '''[[eprint_search_simple.pl]]''' - Simple search over eprints.
 +
* '''[[eprint_search_advanced.pl]]''' - Advanced search over eprints.
 +
* '''[[eprint_search_staff.pl]]''' - Restricted staff-only search over eprints.
 +
* '''[[issues_search.pl]]''' - Search over issues with eprints.
 +
* '''[[latest_tool.pl]]''' - Displaying different listings for latest eprints.
 +
* '''[[user_review_scope.pl]]''' - Managing which eprinst an EPrints ''editor'' user  review.
 +
* '''[[user_search.pl]]''' - Search over user records.
  
$c->{search}->{advanced} ={
+
The configuration within the file includes:
        search_fields => [
+
* '''<code>$c->{match_start_of_name}</code>''' - Text entered in name search field should only match from the start of name.
                { meta_fields => [ $EPrints::Utils::FULLTEXT ] },
+
* '''<code>$c->{latest_citation}</code>''' - What citation style should be used in latest item listing, if no citation style is specified for that listing mode.
                { meta_fields => [ "title" ] },
 
                { meta_fields => [ "creators_name" ] },
 
                { meta_fields => [ "abstract" ] },
 
                { meta_fields => [ "keywords" ] },
 
                { meta_fields => [ "subjects" ] },
 
 
                { meta_fields => [ "divisions" ] },
 
 
                { meta_fields => [ "type" ] },
 
                { meta_fields => [ "department" ] },
 
                { meta_fields => [ "editors_name" ] },
 
                { meta_fields => [ "ispublished" ] },
 
                { meta_fields => [ "refereed" ] },
 
                { meta_fields => [ "publication" ] },
 
                { meta_fields => [ "date" ] }
 
        ],
 
        preamble_phrase => "cgi/advsearch:preamble",
 
        title_phrase => "cgi/advsearch:adv_search",
 
        citation => "result",
 
        page_size => 20,
 
        order_methods => {
 
                "byyear"        => "-date/creators_name/title",
 
                "byyearoldest"  => "date/creators_name/title",
 
                "byname"        => "creators_name/-date/title",
 
                "bytitle"        => "title/creators_name/-date"
 
        },
 
        default_order => "byyear",
 
};
 

Latest revision as of 19:35, 30 January 2022

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Back to cfg.d

search.pl contains generic configution for search. Specific configuration for individual searches exist in their own configuration files:

The configuration within the file includes:

  • $c->{match_start_of_name} - Text entered in name search field should only match from the start of name.
  • $c->{latest_citation} - What citation style should be used in latest item listing, if no citation style is specified for that listing mode.