Hi Devin:

On Fri, 27 Mar 2009, Devin Bougie wrote:

> How would I modify the default search parameters?  For example, by
> default we would like any searches to be ordered by "year" in "desc."
> order.

There are several ways, e.g. (1) edit search_results_default_urlargd
variable in websearch_templates.py and set a default value for "sf"
argument there; (2) edit tmpl_searchfor_simple() function in
websearch_templates.py and add a new hidden HTML input argument "sf" to
the Simple Search interface form.  In the former solution, the new
default sort field will be active for any queries done to your system
(even for `/search/?p=ellis'); in the latter solution, only for users
starting searches from the search interface pages (after you regenerate
these pages by webcoll).

Of course, in the two cases, you'd better not edit
websearch_templates.py directly, but create your own custom
websearch_templates_cornell.py template, as explained in the WebStyle
Admin Guide.
<http://invenio-demo.cern.ch/help/admin/webstyle-admin-guide#overview_page_layout_dyn>

> After using bibupload to insert records from a 0.92.1 installation to
> 0.99.1, all of the records appear as though they were created at the
> same time

You can download your old record creation timestamps (table bibrec,
column creation_date) and update these values on new installation
accordingly.  This won't help you with the default sort order -- since
the ``latest first'' order actually uses record ID order, not record
creation dates -- but at least your detailed record pages will display
real record creation dates to the users.

In order to alter the default sort order, you have to either edit
WebSearch templates as mentioned above, or, if you can afford to change
your record IDs -- which is something that you'd rarely want to do,
because a record ID serves as its permanent identifier -- then you can
upload records in the chronological order (oldest first) in order to
satisfy the default sorting order.  (If you can afford to change your
recIDs, e.g. because you are joining several Invenio instances anyway,
then beware of any external links, any records put in baskets, etc.)

Best regards
-- 
Tibor Simko ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to