Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2: Document changes
authorDennis Schafroth <dennis@indexdata.com>
Fri, 21 Sep 2012 13:05:49 +0000 (15:05 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 21 Sep 2012 13:05:49 +0000 (15:05 +0200)
doc/pazpar2_conf.xml
doc/pazpar2_protocol.xml
test/Makefile.am

index 454cc02..1ad24a2 100644 (file)
        </listitem>
        </varlistentry>
 
+       <varlistentry id="sort-default">
+       <term>sort-default</term>
+       <listitem>
+        <para>
+         Specifies the default sort criteria (default 'relevance'),
+         which previous was hard-coded as default criteria in search. 
+         This is a fix/work-around to avoid re-searching when using 
+         target-based sorting. In order for this to work efficient, 
+         the search must also have the sort critera parameter; otherwise 
+         pazpar2 will do re-searching on search criteria changes, if
+         changed between search and show command.
+        </para>
+        <para>
+         This configuration was added in pazpar2 1.6.20.
+        </para>
+       </listitem>
+       </varlistentry>
+
 <!--       
        <varlistentry>
        <term>set</term>
index e6763e2..f266fd7 100644 (file)
@@ -240,6 +240,31 @@ search.pz?command=settings&session=2044502273&pz:allow[search.com:210/db1]=1
        </para>
       </listitem>
      </varlistentry>
+     <varlistentry>
+      <term>sort</term>
+      <listitem>
+       <para>
+       Specifies sort criteria. The argument is a comma-separated list
+       (no whitespace allowed) of sort fields, with the highest-priority
+       field first. A sort field may be followed by a colon followed by
+       the number '0' (decreasing) or '1' (increasing).  Default
+        sort order is decreasing.
+       Sort field names can be any field name designated as a sort field
+        in the pazpar2.cfg file, or the special names 'relevance' and
+       'position'.
+       </para>
+       <para>
+       If not specified here or as <link linkend="sort-default">sort-default"</link>
+       in pazpar2.cfg, Pazpar2 will default to the built-in 'relevance' ranking. 
+       </para>
+       <para>
+       Having sort criteria at search is important for targets that 
+       supports native sorting in order to get best results. Pazpar2 
+       will trigger a new search if search criteria changes from Pazpar2 
+       to target-based sorting or visa-versa.
+       </para>
+      </listitem>
+     </varlistentry>
     </variablelist>
 
    </para>
@@ -353,6 +378,15 @@ search.pz2?session=2044502273&command=stat
        Sort field names can be any field name designated as a sort field
         in the pazpar2.cfg file, or the special names 'relevance' and
        'position'.
+
+       If not specified here or as <link linkend="sort-default">sort-default"</link> 
+       in pazpar2.cfg, pazpar2 will default to the built-in 'relevance' ranking. 
+
+       Having sort criteria at search is important for targets that 
+       supports native sorting in order to get best results. pazpar2 
+       will trigger a new search if search criteria changes from pazpar2 
+       to target-based sorting.
+
        </para>
        <para>
        For targets where If <link linkend="pz:sortmap">pz:sortmap</link>
index 0c67bee..eeffaf9 100644 (file)
@@ -1,11 +1,11 @@
 # This file is part of Pazpar2.
 
 # These tests require a Solr target
-solr_tests = test_solr.sh test_termlist_block.sh test_limit_limitmap.sh
+solr_tests = test_solr.sh test_termlist_block.sh test_limit_limitmap.sh test_sort.sh
 check_SCRIPTS = test_http.sh test_icu.sh test_post.sh \
  test_settings.sh test_turbomarcxml.sh test_facets.sh \
  test_url.sh test_filter.sh test_tmarc.sh \
- $(solr_tests)
+ $(solr_tests) 
 
 EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        z3950_indexdata_com_marc.xml \
@@ -17,6 +17,8 @@ EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        test_settings.cfg test_settings.urls \
        test_solr.cfg test_solr.urls \
        test_solr_settings_1.xml  test_solr_settings_2.xml  test_solr_settings_3.xml  test_solr_settings_4.xml test_solr_settings_5.xml \
+       test_sort.cfg test_sort.urls \
+       test_sort_settings.xml  \
        test_turbomarcxml.cfg test_turbomarcxml.urls \
        test_url.cfg test_url.urls \
        test_filter.cfg test_filter.urls \