From 27117a6d9d1ff023b7310ad2ea45de1ca72450f3 Mon Sep 17 00:00:00 2001 From: Basil Marti Date: Mon, 17 Jul 2017 10:44:32 +0200 Subject: [PATCH 1/4] Anpassung Sortierung Suchergebnisse bei Archives Online-Export. --- .../swissbib/sru/resources/SearchRetrieveSolr.java | 2 +- .../sru/targets/solr/SOLRQueryTransformation.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/swissbib/sru/resources/SearchRetrieveSolr.java b/src/main/java/org/swissbib/sru/resources/SearchRetrieveSolr.java index ce179f0..342af9d 100644 --- a/src/main/java/org/swissbib/sru/resources/SearchRetrieveSolr.java +++ b/src/main/java/org/swissbib/sru/resources/SearchRetrieveSolr.java @@ -76,7 +76,7 @@ public Representation getSearchResult() throws Exception { SOLRQueryTransformation sQ = new SOLRQueryTransformation(); sQ.setGeneralFilterQuery(this.getGeneralFilterQuery()); - + sQ.setCurrentSchema(this.schemaType); HashMap> searchMapping = (HashMap>) attributes.get("searchMapping"); UtilsCQLRelationsIndexMapping rM = (UtilsCQLRelationsIndexMapping) attributes.get("cqlRelationsMapping"); diff --git a/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java b/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java index d6c13f0..1106f3c 100644 --- a/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java +++ b/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java @@ -4,6 +4,7 @@ import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.common.SolrDocumentList; +import org.swissbib.sru.resources.RequestedSchema; import org.swissbib.sru.targets.common.BasicQueryTransformation; import org.swissbib.sru.targets.common.SRUException; import org.z3950.zing.cql.*; @@ -44,6 +45,8 @@ public class SOLRQueryTransformation extends BasicQueryTransformation { protected String generalFilterQuery = null; + protected RequestedSchema currentSchema; + //private final static SolrServer solrServer; @@ -57,6 +60,10 @@ public void setGeneralFilterQuery(String fq) { this.generalFilterQuery = fq; } + public void setCurrentSchema (RequestedSchema schema) { + this.currentSchema = schema; + } + //private final String serverURL = "http://search.swissbib.ch/solr/sb-biblio/select?"; //private final String defaultParams = "&wt=xml&indent=true"; @@ -102,7 +109,10 @@ public QueryResponse runQuery() throws Exception { System.out.println("invalid rows parameter -> use 10 as default"); } - + if (this.currentSchema == RequestedSchema.aoisadxml) { + String sort = "author_sort asc" ; + parameters.set("sort", sort) ; + } parameters.set("start",startRecord); parameters.set("rows", maxRows) ; From d5724bea05aec9510e8df3424d9f990c19c15045 Mon Sep 17 00:00:00 2001 From: Basil Marti Date: Mon, 17 Jul 2017 11:57:18 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Anpassungen=20Datumsformat=20f=C3=BCr=20Arc?= =?UTF-8?q?hive=20Online.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/xslt/MARC21slim2aoisadxml.xsl | 77 +++++++++---------- 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl b/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl index 4361683..d729538 100644 --- a/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl +++ b/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl @@ -1,28 +1,7 @@ - - - - - - - - - - - - - - - - - - - - + + + @@ -31,16 +10,11 @@ - + + - - - - - - @@ -60,14 +34,33 @@ - - - - c - - - - + + + + + + c + + + + + + + + + + + + + + + + + + + + + @@ -191,13 +184,13 @@ - + - + - + From ad92bba52922a80578449c67ad91ee48558ad446 Mon Sep 17 00:00:00 2001 From: Basil Marti Date: Mon, 17 Jul 2017 15:28:14 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Entfernen=20=C3=BCberfl=C3=BCssige=20Anf?= =?UTF-8?q?=C3=BChrungszeichen=20in=20isad:title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl b/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl index d729538..b77e5a1 100644 --- a/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl +++ b/src/main/webapp/WEB-INF/classes/resources/xslt/MARC21slim2aoisadxml.xsl @@ -29,7 +29,7 @@ ab - ' : ' + : From 73ef105cf17900deefcb716c69edab5cdc24cb2f Mon Sep 17 00:00:00 2001 From: Basil Marti Date: Thu, 20 Jul 2017 15:35:03 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Sortierung=20nach=20Verzeichnungsstufe=20f?= =?UTF-8?q?=C3=BCr=20ao-export=20wieder=20deaktiviert,=20solange=20kein=20?= =?UTF-8?q?Solr-Index=20vorhanden=20ist.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sru/targets/solr/SOLRQueryTransformation.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java b/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java index 1106f3c..f6d5f58 100644 --- a/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java +++ b/src/main/java/org/swissbib/sru/targets/solr/SOLRQueryTransformation.java @@ -109,10 +109,11 @@ public QueryResponse runQuery() throws Exception { System.out.println("invalid rows parameter -> use 10 as default"); } - if (this.currentSchema == RequestedSchema.aoisadxml) { - String sort = "author_sort asc" ; - parameters.set("sort", sort) ; - } + + //if (this.currentSchema == RequestedSchema.aoisadxml) { + // String sort = "author_sort asc" ; + // parameters.set("sort", sort) ; + //} parameters.set("start",startRecord); parameters.set("rows", maxRows) ;