</varlistentry>
<varlistentry>
+ <term>mergekey</term>
+ <listitem>
+ <para>
+ Sets mergekey for this search and rest of session, or until
+ another mergekey is given for show/search. The mergekey value is a
+ comma separated list with one or more names as they appear
+ in the service description equivalent to
+ <literal>mergekey="optional"</literal> inside a metadata element.
+ If the empty string is given for mergekey it is disabled
+ and rest of session will use the default mergekey from service
+ or stylesheet.
+ </para>
+ <para>
+ This facility, "dynamic mergekey", appeared in Pazpar2 version
+ 1.6.31.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>sort</term>
<listitem>
<para>
<listitem>
<para>
Sets mergekey for this show and rest of session, or until
- another mergekey is given for show. The mergekey value is a
+ another mergekey is given for show/search. The mergekey value is a
comma separated list with one or more names as they appear
in the service description equivalent to
<literal>mergekey="optional"</literal> inside a metadata element.
const char *startrecs = http_argbyname(rq, "startrecs");
const char *limit = http_argbyname(rq, "limit");
const char *sort = http_argbyname(rq, "sort");
+ const char *mergekey = http_argbyname(rq, "mergekey");
enum pazpar2_error_code code;
const char *addinfo = 0;
struct reclist_sortparms *sp;
}
code = session_search(s->psession, query, startrecs, maxrecs, filter, limit,
- &addinfo, sp);
+ &addinfo, sp, mergekey);
if (code)
{
error(rs, code, addinfo);
const char *filter,
const char *limit,
const char **addinfo,
- struct reclist_sortparms *sp)
+ struct reclist_sortparms *sp,
+ const char *mergekey)
{
int live_channels = 0;
int no_working = 0;
session_enter(se, "session_search");
se->settings_modified = 0;
+ if (mergekey)
+ {
+ xfree(se->mergekey);
+ se->mergekey = *mergekey ? xstrdup(mergekey) : 0;
+ }
+
session_clear_set(se, sp);
relevance_destroy(&se->relevance);
const char *maxrecs,
const char *filter, const char *limit,
const char **addinfo,
- struct reclist_sortparms *sort_parm);
+ struct reclist_sortparms *sort_parm,
+ const char *mergekey);
struct record_cluster **show_range_start(struct session *s,
struct reclist_sortparms *sp,
int start,
http://localhost:9763/search.pz2?session=10&command=show&block=1
http://localhost:9763/search.pz2?session=10&command=record&id=content%3A+title+the+religious+teachers+of+greece+author+adam+james+medium+book&offset=0&esn=F&r=1
http://localhost:9763/search.pz2?session=10&command=record&id=content%3A+title+the+religious+teachers+of+greece+author+adam+james+medium+book&offset=0&esn=F&r=2
-http://localhost:9763/search.pz2?session=10&command=search&query=computer
+http://localhost:9763/search.pz2?session=10&command=search&query=computer&mergekey=title,author
http://localhost:9763/search.pz2?session=10&command=show&block=1
http://localhost:9763/search.pz2?session=10&command=show&block=1&mergekey=date
http://localhost:9763/search.pz2?session=10&command=show&block=1&mergekey=
computer: relevance += 100000 * tf[1](2.400000) * idf[1](0.200671) (48160);
score = relevance(48160);
</relevance_info>
- <recid>content: title how to program a computer author jack collins medium book</recid>
+ <recid>content: title how to program a computer author jack collins</recid>
</hit>
<hit>
<md-title>Computer science & technology</md-title>
computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134);
score = relevance(40134);
</relevance_info>
- <recid>content: title computer science technology author medium book</recid>
+ <recid>content: title computer science technology</recid>
</hit>
<hit>
<md-title>The Computer Bible</md-title>
computer: relevance += 100000 * tf[1](2.000000) * idf[1](0.200671) (40134);
score = relevance(40134);
</relevance_info>
- <recid>content: title the computer bible author medium book</recid>
+ <recid>content: title the computer bible</recid>
</hit>
<hit>
<md-title>A plan for community college computer development</md-title>
computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200);
score = relevance(17200);
</relevance_info>
- <recid>content: title a plan for community college computer development author medium book</recid>
+ <recid>content: title a plan for community college computer development</recid>
</hit>
<hit>
<md-title>Washington metropolitan area rail computer feasibility study;</md-title>
computer: relevance += 100000 * tf[1](0.857143) * idf[1](0.200671) (17200);
score = relevance(17200);
</relevance_info>
- <recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+ <recid>content: title washington metropolitan area rail computer feasibility study author englund carl r</recid>
</hit>
<hit>
<md-title>The Puget Sound Region</md-title>
computer: relevance += 100000 * tf[1](0.833333) * idf[1](0.200671) (16722);
score = relevance(16722);
</relevance_info>
- <recid>content: title the puget sound region author mairs john w medium book</recid>
+ <recid>content: title the puget sound region author mairs john w</recid>
</hit>
<hit>
<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040);
score = relevance(12040);
</relevance_info>
- <recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+ <recid>content: title computer processing of dynamic images from an anger scintillation camera</recid>
</hit>
<hit>
<md-title>The use of passwords for controlled access to computer resources</md-title>
computer: relevance += 100000 * tf[1](0.600000) * idf[1](0.200671) (12040);
score = relevance(12040);
</relevance_info>
- <recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+ <recid>content: title the use of passwords for controlled access to computer resources author wood helen m</recid>
</hit>
<hit>
<md-title>Reconstruction tomography in diagnostic radiology and nuclear medicine</md-title>
computer: relevance += 100000 * tf[1](0.000000) * idf[1](0.200671) (0);
score = relevance(0);
</relevance_info>
- <recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+ <recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine</recid>
</hit>
</show>
\ No newline at end of file