From 12500c1403078d44ed49b862c7da6af441c6a556 Mon Sep 17 00:00:00 2001
From: Maximilian Brodhun <brodhun@sub.uni-goettingen.de>
Date: Wed, 7 May 2014 15:21:55 +0200
Subject: [PATCH] Changed setting for elasticsearch version 1.0.1 Correct an
 error within the dc element names

---
 oaipmh-core/.classpath                        |  54 +++---
 oaipmh-core/pom.xml                           |   2 +-
 .../middleware/DublinCoreBuilder.java         |   2 +-
 .../info/textgrid/middleware/OAIPMHImpl.java  |   8 +-
 .../textgrid/middleware/RecordDeliverer.java  | 174 ++++++++++++-----
 .../middleware/RecordListDeliverer.java       | 175 +++++++++++++-----
 .../info/textgrid/middleware/OaiPmhTest.java  |  42 ++---
 oaipmh-webapp/.classpath                      |  54 +++---
 pom.xml                                       |   2 +-
 9 files changed, 332 insertions(+), 181 deletions(-)

diff --git a/oaipmh-core/.classpath b/oaipmh-core/.classpath
index 3190a020..67574496 100644
--- a/oaipmh-core/.classpath
+++ b/oaipmh-core/.classpath
@@ -154,70 +154,70 @@
       <attribute value="jar:file:/home/max/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/elasticsearch/elasticsearch/0.90.7/elasticsearch-0.90.7.jar" sourcepath="M2_REPO/org/elasticsearch/elasticsearch/0.90.7/elasticsearch-0.90.7-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/elasticsearch/elasticsearch/1.0.1/elasticsearch-1.0.1.jar" sourcepath="M2_REPO/org/elasticsearch/elasticsearch/1.0.1/elasticsearch-1.0.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
   <classpathentry kind="var" path="M2_REPO/com/spatial4j/spatial4j/0.3/spatial4j-0.3.jar" sourcepath="M2_REPO/com/spatial4j/spatial4j/0.3/spatial4j-0.3-sources.jar">
diff --git a/oaipmh-core/pom.xml b/oaipmh-core/pom.xml
index d7da70f3..0b9a448b 100644
--- a/oaipmh-core/pom.xml
+++ b/oaipmh-core/pom.xml
@@ -72,7 +72,7 @@
 		<dependency>
 			<groupId>org.elasticsearch</groupId>
 			<artifactId>elasticsearch</artifactId>
-			<version>0.90.7</version>
+			<version>1.0.1</version>
 		</dependency>
 		
 		<dependency>
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/DublinCoreBuilder.java b/oaipmh-core/src/main/java/info/textgrid/middleware/DublinCoreBuilder.java
index 1e50d50d..00fdef6e 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/DublinCoreBuilder.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/DublinCoreBuilder.java
@@ -193,7 +193,7 @@ public final class DublinCoreBuilder {
 	public void setRights(List<String> rights){
 	    for (String dcrights : rights) {
 	      	ElementType rightsElement = new ElementType();
-	    	JAXBElement<ElementType> dcCoreRights = getOaiDcObj().createRelation(rightsElement);
+	    	JAXBElement<ElementType> dcCoreRights = getOaiDcObj().createRights(rightsElement);
 	    	rightsElement.setValue(dcrights);
 	    	getTgMappedDC().getTitleOrCreatorOrSubject().add(dcCoreRights);
 	    }
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
index d6f6f7ad..0ec3603b 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
@@ -340,7 +340,7 @@ public class OAIPMHImpl implements OAIPMHProducer{
 		JAXBElement<OAIPMHType> oaipmhRoot = obf.createOAIPMH(oai);
 		
 		if(recordList.requestChecker(request)){
-					
+				
 			if(request.getSet()!=null){
 				error.setError(TGConstants.OAI_NO_SET_HIERARCHY).setValue("The repository does not support sets");
 				oai.getError().add(error.setError(TGConstants.OAI_NO_SET_HIERARCHY));
@@ -351,8 +351,9 @@ public class OAIPMHImpl implements OAIPMHProducer{
 						+ request.getIdentifier());
 				oai.getError().add(error.setError(TGConstants.OAI_METADATA_FORMAT_ERROR));
 			}else{
-				if(recordList.getRecords(request.getFrom(), request.getUntil())!=null){
-					listRecords = recordList.getRecords(request.getFrom(), request.getUntil());
+				listRecords = recordList.getRecords(request.getFrom(), request.getUntil());
+				if(listRecords!=null){
+					
 					oai.setListRecords(listRecords);
 				}else{
 					error.setError(TGConstants.OAI_NO_RECORD_MATCH).setValue("The combination of the values " + request.getFrom() + " and " +
@@ -361,7 +362,6 @@ public class OAIPMHImpl implements OAIPMHProducer{
 				}
 			}
 		}else{
-			
 			if(request.getIdentifier()!=null){
 				errorValues.add("identifier");
 			}if(request.getMetadataPrefix()==null){
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java
index b7da70d9..946a0a5e 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java
@@ -76,11 +76,17 @@ public class RecordDeliverer {
 		GetRequestBuilder recordById = oaiEsClient.getOaiESClient().prepareGet()
 				.setIndex(oaiEsClient.getEsIndex())
 				.setType(oaiEsClient.getEsType())
-				.setFields("dataContributor", "edition.agent", "format", "created", "textgridUri", "pid", "identifier",
-						"edition.isEditionOf", "edition.source.bibliographicCitation.publisher", 
-						"edition.source.bibliographicCitation", "project", "relations.isDerivedFrom",
-						"edition.license", "language", "title")
+				.setFields("format", "created", "edition.isEditionOf", "edition.agent.value", "dataContributor",
+						"textgridUri", "project.id", "relations.isDerivedFrom", "edition.license.licenseUri",
+						"title", "edition.language", "pid.value", "edition.source.bibliographicCitation.author.value",
+						"edition.source.bibliographicCitation.editor.value", "edition.source.bibliographicCitation.editionTitle",
+						"edition.source.bibliographicCitation.placeOfPublication.value","edition.source.bibliographicCitation.publisher.value",
+						"edition.source.bibliographicCitation.editionNo", "edition.source.bibliographicCitation.series",
+						"edition.source.bibliographicCitation.volume", "edition.source.bibliographicCitation.issue",
+						"edition.source.bibliographicCitation.epage", "edition.source.bibliographicCitation.spage",
+						"edition.source.bibliographicCitation.bibidentifier")
 				.setId(id); 
+		
 		GetResponse tgObject = recordById.execute().actionGet();
 		
 		
@@ -93,71 +99,115 @@ public class RecordDeliverer {
 			/*
 			 * DC-Contributor
 			 */
-			String contributorUnformatted = tgObject.getField("edition.agent").getValue().toString();
-			String contributorFormatted = contributorUnformatted.substring(2, contributorUnformatted.indexOf("id")-2);
-		
-			contributors.add(tgObject.getField("dataContributor").getValue().toString());
-			contributors.add(contributorFormatted);
-		
+			//System.out.println(hit.getFields().get("textgridUri").values().get(0).toString());
+			if(tgObject.getField("edition.agent.value")!=null){
+				String contributorUnformatted = tgObject.getField("edition.agent.value").getValue().toString();
+				contributors.add(tgObject.getField("dataContributor").getValue().toString());
+				contributors.add(contributorUnformatted);
+			}
+			
+			
 			/*
 			 * DC-Format
 			 */
 			formats.add(tgObject.getField("format").getValue().toString());
-		
+			
 			/*
 			 * DC-Identifier
 			 */
 			identifiers.add(tgObject.getField("textgridUri").getValue().toString());
-				
-			if(tgObject.getFields().get("pid")!=null){
-				identifiers.add(tgObject.getField("pid").getValue().toString());
+			String identifier =  identifiers.get(0);
+			
+			if(tgObject.getField("pid.value")!=null){
+				identifiers.add(tgObject.getField("pid.value").getValue().toString());
 			}
-		
-			if(tgObject.getFields().get("identifier")!=null){
+			
+			if(tgObject.getField("identifier")!=null){
 				identifiers.add(tgObject.getField("identifier").getValue().toString());
 			}
-		
+			
 			/*
 			 * DC-Languages
 			 */
-		
-			if(tgObject.getFields().get("edition.language")!=null){
+			
+			if(tgObject.getField("edition.language")!=null){
 				languages.add(tgObject.getField("edition.language").getValue().toString());
 			}
-		
+			
 			/*
 			 * DC-Publisher
 			 */
-			if(tgObject.getFields().get("edition.source.bibliographicCitation.publisher")!=null){
+			if(tgObject.getField("edition.source.bibliographicCitation.publisher")!=null){
 				publishers.add(tgObject.getField("edition.source.bibliographicCitation.publisher").getValue().toString());
 			}
-		
+			
 			/*
 			 * DC-Relation
 			 */
-			relations.add(tgObject.getField("project").getValue().toString());
-			relations.add(tgObject.getField("relations.isDerivedFrom").getValue().toString());
-		
+			relations.add(tgObject.getField("project.id").getValue().toString());
+			
+			if(tgObject.getField("relations.isDerivedFrom")!=null){
+				relations.add(tgObject.getField("relations.isDerivedFrom").getValue().toString());
+			}
+			
 			/*
 			 * DC-Rights
-			 */
-			rights.add(tgObject.getField("edition.license").getValue().toString());
-		
+			*/
+					
+			if(tgObject.getField("edition.license.licenseUri")!=null){
+				rights.add(tgObject.getField("edition.license.licenseUri").getValue().toString());
+			}
+					
 			/*
 			 * DC-Source
 			 */
-			if(tgObject.getFields().get("edition.source.bibliographicCitation")!=null){
-				sources.add(tgObject.getField("edition.source.bibliographicCitation").getValue().toString());
+			
+			if(tgObject.getField("edition.source.bibliographicCitation.author.value")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.author.value").getValue().toString());
 			}
-		
+			if(tgObject.getField("edition.source.bibliographicCitation.editor.value")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.editor.value").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.editionTitle")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.editionTitle").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.placeOfPublication.value")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.placeOfPublication.value").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.publisher.value")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.publisher.value").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.editionNo")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.editionNo").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.series")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.series").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.volume")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.volume").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.issue")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.issue").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.spage")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.spage").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.epage")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.epage").getValue().toString());
+			}
+			if(tgObject.getField("edition.source.bibliographicCitation.bibidentifier")!=null){
+				sources.add(tgObject.getField("edition.source.bibliographicCitation.epage").getValue().toString());
+			}
+			
 			/*
 			 * DC-Title
 			 */
+			
 			titles.add(tgObject.getField("title").getValue().toString());
-			furtherDCElements(workUri);
 			
+			furtherDCElements(workUri);
 			try {
-				recordHeader.setIdentifier(identifiers.get(0));
+				recordHeader.setIdentifier(identifier);
 				recordHeader.setDatestamp(OAIPMHUtillities.datestampAsString(dates.get(0)));
 			} catch (ParseException e) {
 				log.debug("Could not parse Datestamp out of: " + dates.get(0));
@@ -180,29 +230,42 @@ public class RecordDeliverer {
 	
 	
 	public void furtherDCElements(String id){
-				
+				System.out.println("yo");
 		GetRequestBuilder getWorkValues = oaiEsClient.getOaiESClient().prepareGet()
 				.setIndex(oaiEsClient.getEsIndex())
 				.setType(oaiEsClient.getEsType())
 				.setId(id)
-				.setFields("work.spatial","work.temporal", "work.agent", "created", 
-						"work.abstract", "relations.isDerivedFrom", "textgridUri", "title", 
-						"work.subject", "work.genre", "work.type"); 
+				.setFields("created", 
+						"work.abstract", "relations.isDerivedFrom", "textgridUri", 
+						"work.genre","title", "work.type","work.spatial.value", "work.temporal.value",
+						"work.agent.value", "work.subject.id.value"); 
 				
 		
 		GetResponse responseWorkValues = getWorkValues.execute().actionGet();
 		
-		if(responseWorkValues.getField("work.spatial")!=null){
-			coverages.add(responseWorkValues.getField("work.spatial").getValue().toString());
-			coverages.add(responseWorkValues.getField("work.temporal").getValue().toString());
+		/**
+		 * DC-Coverages
+		 */
+		
+		if(responseWorkValues.getField("work.spatial.value")!=null){
+			coverages.add(responseWorkValues.getField("work.spatial.value").getValue().toString());
+			coverages.add(responseWorkValues.getField("work.temporal.value").getValue().toString());
 		}
 		
-		if(responseWorkValues.getField("work.agent")!=null){
-			creators.add(responseWorkValues.getField("work.agent").getValue().toString());
+		/**
+		 * DC-Creators
+		 */
+		
+		if(responseWorkValues.getField("work.agent.value")!=null){
+			creators.add(responseWorkValues.getField("work.agent.value").getValue().toString());
 		}
 		
 		String singleDate = responseWorkValues.getField("created").getValue().toString();
 		
+		/*
+		 * DC-Date
+		 */
+		
 		try {
 			dates.add(OAIPMHUtillities.convertDateFormat(singleDate).toXMLFormat());
 		} catch (ParseException e) {
@@ -210,23 +273,40 @@ public class RecordDeliverer {
 		} catch (DatatypeConfigurationException e) {
 			log.debug(e);
 		}
-				
+		
+		/*
+		 * DC-Description
+		 */
 		if(responseWorkValues.getField("work.abstract")!=null){
 			descriptions.add(responseWorkValues.getField("work.abstract").getValue().toString());
 		}
 		
+		/*
+		 * DC-Relation
+		 */
 		if(responseWorkValues.getField("relations.isDerivedFrom")!=null){
 			relations.add(responseWorkValues.getField("relations.isDerivedFrom").getValue().toString());
 		}
 		relations.add(responseWorkValues.getField("title").getValue().toString());
 		relations.add(responseWorkValues.getField("textgridUri").getValue().toString());
 		
-		if(responseWorkValues.getField("work.subject")!=null){
-			subjects.add(responseWorkValues.getField("work.subject").getValue().toString());
+		/*
+		 * DC-Subject
+		 */
+		
+		if(responseWorkValues.getField("work.subject.id.value")!=null){
+			subjects.add(responseWorkValues.getField("work.subject.id.value").getValue().toString());
 		}
 		
-		types.add(responseWorkValues.getField("work.genre").getValue().toString());
-		types.add(responseWorkValues.getField("work.type").getValue().toString());
+		/*
+		 * DC-Type
+		 */
+		if(responseWorkValues.getField("work.genre")!=null){
+			types.add(responseWorkValues.getField("work.genre").getValue().toString());
+		}
+		if(responseWorkValues.getField("work.type")!=null){
+			types.add(responseWorkValues.getField("work.type").getValue().toString());
+		}
 		
 	}
 	
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java
index aca30115..51f19fe0 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java
@@ -60,36 +60,35 @@ public class RecordListDeliverer {
 		SearchRequestBuilder getRecordList = oaiEsClient.getOaiESClient()
 				.prepareSearch(oaiEsClient.getEsIndex())
 				.setTypes(oaiEsClient.getEsType())
-				.addFields("dataContributor", "edition.agent")
-				.addFields("format")
-				.addFields("created")
-				.addFields("textgridUri", "pid", "identifier")
-				.addField("edition.isEditionOf")
-				.addField("edition.source.bibliographicCitation.publisher")
-				.addField("edition.source.bibliographicCitation")
-				.addFields("project", "relations.isDerivedFrom")
-				.addField("edition.license")
-				.addField("language")
-				.addField("title")
+				.addFields("format", "created", "edition.isEditionOf", "edition.agent.value", "dataContributor",
+						"textgridUri", "project.id", "relations.isDerivedFrom", "edition.license.licenseUri",
+						"title", "edition.language", "pid.value", "edition.source.bibliographicCitation.author.value",
+						"edition.source.bibliographicCitation.editor.value", "edition.source.bibliographicCitation.editionTitle",
+						"edition.source.bibliographicCitation.placeOfPublication.value","edition.source.bibliographicCitation.publisher.value",
+						"edition.source.bibliographicCitation.editionNo", "edition.source.bibliographicCitation.series",
+						"edition.source.bibliographicCitation.volume", "edition.source.bibliographicCitation.issue",
+						"edition.source.bibliographicCitation.epage", "edition.source.bibliographicCitation.spage",
+						"edition.source.bibliographicCitation.bibidentifier")
 				.setQuery(queryBuilder)
-				.setFilter(FilterBuilders.existsFilter("isEditionOf"));
+				.setPostFilter(FilterBuilders.existsFilter("edition.isEditionOf"))
+				.setSize(10000);
 				
 		SearchResponse getRecordListItems = getRecordList.execute().actionGet();
 		
 		if(getRecordListItems.getHits().totalHits()>0){
-		
-		for(SearchHit hit : getRecordListItems.getHits().getHits()) {
-			
-			if(hit.getFields().get("format").getValue().toString().equals("text/tg.edition+tg.aggregation+xml")){
-						
-			ObjectFactory of = new ObjectFactory();
-			OaiDcType odt = new OaiDcType();
-			DublinCoreBuilder newDbc = new DublinCoreBuilder(odt, of);
-			MetadataType metadata = new MetadataType();
-			RecordType record = new RecordType();
-			HeaderType recordHeader = new HeaderType();
+					
+			for(SearchHit hit : getRecordListItems.getHits().getHits()){
+
+				if(hit.getFields().get("format").values().get(0).toString().equals("text/tg.edition+tg.aggregation+xml")){
+					
+					ObjectFactory of = new ObjectFactory();
+					OaiDcType odt = new OaiDcType();
+					DublinCoreBuilder newDbc = new DublinCoreBuilder(odt, of);
+					MetadataType metadata = new MetadataType();
+					RecordType record = new RecordType();
+					HeaderType recordHeader = new HeaderType();
 			
-			String datestamp = hit.getFields().get("created").getValue().toString();
+					String datestamp = hit.getFields().get("created").getValue().toString();
 			
 			try {
 				datestamp = OAIPMHUtillities.convertDateFormat(datestamp).toXMLFormat();
@@ -101,14 +100,17 @@ public class RecordListDeliverer {
 			
 			String workUri = hit.getFields().get("edition.isEditionOf").values().get(0).toString();
 			workUri = workUri.substring(TGConstants.TG_ITEM_IDENTIFIER_PREFIX.length());
+			
 			/*
 			 * DC-Contributor
 			 */
-			String contributorUnformatted = hit.getFields().get("edition.agent").values().get(0).toString();
-			String contributorFormatted = contributorUnformatted.substring(2, contributorUnformatted.indexOf("id")-2);
+			//System.out.println(hit.getFields().get("textgridUri").values().get(0).toString());
+			if(hit.getFields().get("edition.agent.value")!=null){
+				String contributorUnformatted = hit.getFields().get("edition.agent.value").values().get(0).toString();
+				contributors.add(hit.getFields().get("dataContributor").values().get(0).toString());
+				contributors.add(contributorUnformatted);
+			}
 			
-			contributors.add(hit.getFields().get("dataContributor").values().get(0).toString());
-			contributors.add(contributorFormatted);
 			
 			/*
 			 * DC-Format
@@ -121,8 +123,8 @@ public class RecordListDeliverer {
 			identifiers.add(hit.getFields().get("textgridUri").values().get(0).toString());
 			String identifier =  identifiers.get(0);
 			
-			if(hit.getFields().get("pid")!=null){
-				identifiers.add(hit.getFields().get("pid").values().get(0).toString());
+			if(hit.getFields().get("pid.value")!=null){
+				identifiers.add(hit.getFields().get("pid.value").values().get(0).toString());
 			}
 			
 			if(hit.getFields().get("identifier")!=null){
@@ -134,6 +136,7 @@ public class RecordListDeliverer {
 			 */
 			
 			if(hit.getFields().get("edition.language")!=null){
+				
 				languages.add(hit.getFields().get("edition.language").values().get(0).toString());
 			}
 			
@@ -147,21 +150,61 @@ public class RecordListDeliverer {
 			/*
 			 * DC-Relation
 			 */
-			relations.add(hit.getFields().get("project").values().get(0).toString());
-			relations.add(hit.getFields().get("relations.isDerivedFrom").values().get(0).toString());
+			relations.add(hit.getFields().get("project.id").values().get(0).toString());
+			
+			if(hit.getFields().get("relations.isDerivedFrom")!=null){
+				relations.add(hit.getFields().get("relations.isDerivedFrom").values().get(0).toString());
+			}
 			
 			/*
 			 * DC-Rights
 			*/
-			rights.add(hit.getFields().get("edition.license").values().get(0).toString());
+		//	System.out.println(hit.getFields().get("textgridUri").values().get(0).toString());
+			
+			if(hit.getFields().get("edition.license.licenseUri")!=null){
+				rights.add(hit.getFields().get("edition.license.licenseUri").values().get(0).toString());
+			}
+			
 			
 			/*
 			 * DC-Source
 			 */
-			if(hit.getFields().get("edition.source.bibliographicCitation")!=null){
-				sources.add(hit.getFields().get("edition.source.bibliographicCitation").values().get(0).toString());
+			if(hit.getFields().get("edition.source.bibliographicCitation.author.value")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.author.value").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.editor.value")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.editor.value").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.editionTitle")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.editionTitle").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.placeOfPublication.value")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.placeOfPublication.value").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.publisher.value")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.publisher.value").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.editionNo")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.editionNo").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.series")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.series").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.volume")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.volume").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.issue")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.issue").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.spage")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.spage").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.epage")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.epage").values().get(0).toString());
+			}
+			if(hit.getFields().get("edition.source.bibliographicCitation.bibidentifier")!=null){
+				sources.add(hit.getFields().get("edition.source.bibliographicCitation.epage").values().get(0).toString());
 			}
-			
 			/*
 			 * DC-Title
 			 */
@@ -198,6 +241,7 @@ public class RecordListDeliverer {
 		else{
 			recordList=null;
 		}
+	
 		return recordList;
 	}
 	
@@ -207,24 +251,37 @@ public class RecordListDeliverer {
 				.setIndex(esClient.getEsIndex())
 				.setType(esClient.getEsType())
 				.setId(id)
-				.setFields("work.spatial","work.temporal", "work.agent", "created", 
-						"work.abstract", "relations.isDerivedFrom", "textgridUri", "title", 
-						"work.subject", "work.genre", "work.type"); 
+				.setFields("created", 
+						"work.abstract", "relations.isDerivedFrom", "textgridUri", 
+						"work.genre","title", "work.type","work.spatial.value", "work.temporal.value",
+						"work.agent.value", "work.subject.id.value"); 
 				
 		
 		GetResponse responseWorkValues = getWorkValues.execute().actionGet();
 		
-		if(responseWorkValues.getField("work.spatial")!=null){
-			coverages.add(responseWorkValues.getField("work.spatial").getValue().toString());
-			coverages.add(responseWorkValues.getField("work.temporal").getValue().toString());
+		/**
+		 * DC-Coverages
+		 */
+		
+		if(responseWorkValues.getField("work.spatial.value")!=null){
+			coverages.add(responseWorkValues.getField("work.spatial.value").getValue().toString());
+			coverages.add(responseWorkValues.getField("work.temporal.value").getValue().toString());
 		}
 		
-		if(responseWorkValues.getField("work.agent")!=null){
-			creators.add(responseWorkValues.getField("work.agent").getValue().toString());
+		/**
+		 * DC-Creators
+		 */
+		
+		if(responseWorkValues.getField("work.agent.value")!=null){
+			creators.add(responseWorkValues.getField("work.agent.value").getValue().toString());
 		}
 		
 		String singleDate = responseWorkValues.getField("created").getValue().toString();
 		
+		/*
+		 * DC-Date
+		 */
+		
 		try {
 			dates.add(OAIPMHUtillities.convertDateFormat(singleDate).toXMLFormat());
 		} catch (ParseException e) {
@@ -232,25 +289,41 @@ public class RecordListDeliverer {
 		} catch (DatatypeConfigurationException e) {
 			log.debug(e);
 		}
-				
+		
+		/*
+		 * DC-Description
+		 */
 		if(responseWorkValues.getField("work.abstract")!=null){
 			descriptions.add(responseWorkValues.getField("work.abstract").getValue().toString());
 		}
 		
+		/*
+		 * DC-Relation
+		 */
 		if(responseWorkValues.getField("relations.isDerivedFrom")!=null){
 			relations.add(responseWorkValues.getField("relations.isDerivedFrom").getValue().toString());
 		}
 		relations.add(responseWorkValues.getField("title").getValue().toString());
 		relations.add(responseWorkValues.getField("textgridUri").getValue().toString());
 		
-		if(responseWorkValues.getField("work.subject")!=null){
-			subjects.add(responseWorkValues.getField("work.subject").getValue().toString());
-		}
-		
-		types.add(responseWorkValues.getField("work.genre").getValue().toString());
-		types.add(responseWorkValues.getField("work.type").getValue().toString());
+		/*
+		 * DC-Subject
+		 */
 		
+		if(responseWorkValues.getField("work.subject.id.value")!=null){
+			subjects.add(responseWorkValues.getField("work.subject.id.value").getValue().toString());
+		}
 		
+		/*
+		 * DC-Type
+		 */
+		if(responseWorkValues.getField("work.genre")!=null){
+			types.add(responseWorkValues.getField("work.genre").getValue().toString());
+		}
+		if(responseWorkValues.getField("work.type")!=null){
+			types.add(responseWorkValues.getField("work.type").getValue().toString());
+		}
+			
 	}
 	
 	public DublinCoreBuilder setDCObject(OaiDcType odt, ObjectFactory of){
diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
index ea5ad7a3..60486496 100644
--- a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
+++ b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
@@ -9,7 +9,6 @@ import javax.xml.bind.JAXBElement;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.datatype.XMLGregorianCalendar;
 
-
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -24,25 +23,24 @@ public class OaiPmhTest{
 	@BeforeClass
 	public static void setUp() throws Exception {
 				
-		oaiEsClient = new OAI_ESClient("10.160.254.106", 9300, "tg-search-es-ws4");
-		oaiEsClient.setEsIndex("textgrid-public-ws4");
+		oaiEsClient = new OAI_ESClient("localhost", 9302, "esx-2-test-instance");
+		oaiEsClient.setEsIndex("textgrid-public");
 		oaiEsClient.setEsType("metadata");
 				
 	}
-	
-	
+		
 	/*@Test
 	@Ignore
 	public void testListRecords() throws ParseException{
 		
-		JAXBElement<OAIPMHType> r = testRequest.getRequest("ListRecords", "", "oai_dc", "", "", "", "");
+		JAXBElement<OAIPMHType> r = testRequest.getRequest("ListRecords", "", "oai_dc", "", "2014-02-06T20:48:39", "", "");
 		JAXB.marshal(r, System.out);
 		System.out.println("-----------------------------------\n");
-	}*/
+	}
 	
 	
-	/*@Test
-	//@Ignore
+	@Test
+	@Ignore
 	public void testListMetadataFormats() throws ParseException{
 		
 		JAXBElement<OAIPMHType> r = testRequest.getRequest("ListMetadataFormats", "wr67.0", "", "", "", "", "");
@@ -51,7 +49,7 @@ public class OaiPmhTest{
 	}*/
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testDateNow() throws DatatypeConfigurationException{
 		System.out.println("---------------Now Version-----------------");		
 		XMLGregorianCalendar nowTest = OAIPMHUtillities.getXMLGregorianCalendarNow();
@@ -60,7 +58,7 @@ public class OaiPmhTest{
 	}
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testDateGregorianType() throws ParseException, DatatypeConfigurationException{
 		String dateformatbefore = "2012-02-06T20:48:39.614+01:00";
 		
@@ -72,7 +70,7 @@ public class OaiPmhTest{
 	}
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testDateStringType() throws ParseException, DatatypeConfigurationException{
 		String dateformatbefore = "2012-02-06T20:48:39.614+01:00";
 		
@@ -84,7 +82,7 @@ public class OaiPmhTest{
 	}
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testListSets() throws ParseException{
 		
 		JAXBElement<OAIPMHType> r = testRequest.getRequest("ListSets", "", "", "", "", "", "");
@@ -93,7 +91,7 @@ public class OaiPmhTest{
 	}
 	
 	/*@Test
-	//@Ignore
+	@Ignore
 	public void testListIdentifiers() throws ParseException{
 		
 		JAXBElement<OAIPMHType> r = testRequest.getRequest("ListIdentifiers", "", "oai_dc", "", "", "", "");
@@ -102,7 +100,7 @@ public class OaiPmhTest{
 	}*/
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testGetRequestIdentify() throws ParseException{
 		
 		System.out.println("Test for the verb \"Identify\" with succesfull response");
@@ -112,22 +110,22 @@ public class OaiPmhTest{
 	}
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testGetRequestIdentifyVerbError() throws ParseException{
-		JAXBElement<OAIPMHType> t = testRequest.getRequest("Identify", "", "", "", "", "", "");
+		JAXBElement<OAIPMHType> t = testRequest.getRequest("Identify", "", "a", "", "", "", "");
 		JAXB.marshal(t, System.out);
 		System.out.println("-----------------------------------\n");
 	}
 	
 	@Test
-	//@Ignore
+	@Ignore
 	public void testGetRequestIdentifyArgumentError() throws ParseException{
 		System.out.println("Test for the verb \"Identify\" with error response");
 		JAXBElement<OAIPMHType> z = testRequest.getRequest("Identify", "a", "", "", "", "a", "");
 		JAXB.marshal(z, System.out);
 		System.out.println("-----------------------------------\n");
 	}
-	/*	@Test
+	/*@Test
 	//@Ignore
 	public void testGetRequestGetRecordError() throws ParseException{
 		System.out.println("Test for the verb \"GetRecord\" with succesfull response");
@@ -135,9 +133,9 @@ public class OaiPmhTest{
 		JAXB.marshal(t, System.out);
 		System.out.println("-----------------------------------\n");
 		
-	}*/
+	}
 	
-	/*@Test
+	@Test
 	//@Ignore
 	public void testGetRequestGetRecordError2() throws ParseException{
 		System.out.println("Test for the verb \"GetRecord\" with succesfull response");
@@ -147,7 +145,7 @@ public class OaiPmhTest{
 		
 	}
 
-	/*@Test
+	@Test
 	//@Ignore
 	public void testGetRequestGetRecordError3() throws ParseException{
 		System.out.println("Test for the verb \"GetRecord\" with succesfull response");
diff --git a/oaipmh-webapp/.classpath b/oaipmh-webapp/.classpath
index c361ad0a..d238a371 100644
--- a/oaipmh-webapp/.classpath
+++ b/oaipmh-webapp/.classpath
@@ -168,70 +168,70 @@
       <attribute value="jar:file:/home/max/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/elasticsearch/elasticsearch/0.90.7/elasticsearch-0.90.7.jar" sourcepath="M2_REPO/org/elasticsearch/elasticsearch/0.90.7/elasticsearch-0.90.7-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/elasticsearch/elasticsearch/1.0.1/elasticsearch-1.0.1.jar" sourcepath="M2_REPO/org/elasticsearch/elasticsearch/1.0.1/elasticsearch-1.0.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-core/4.5.1/lucene-core-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-core/4.6.1/lucene-core-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.5.1/lucene-analyzers-common-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.6.1/lucene-analyzers-common-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-codecs/4.5.1/lucene-codecs-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-codecs/4.6.1/lucene-codecs-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queries/4.5.1/lucene-queries-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queries/4.6.1/lucene-queries-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-memory/4.5.1/lucene-memory-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-memory/4.6.1/lucene-memory-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-highlighter/4.5.1/lucene-highlighter-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-highlighter/4.6.1/lucene-highlighter-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queryparser/4.5.1/lucene-queryparser-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-queryparser/4.6.1/lucene-queryparser-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-sandbox/4.5.1/lucene-sandbox-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-sandbox/4.6.1/lucene-sandbox-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-suggest/4.5.1/lucene-suggest-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-suggest/4.6.1/lucene-suggest-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-misc/4.5.1/lucene-misc-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-misc/4.6.1/lucene-misc-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-join/4.5.1/lucene-join-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-join/4.6.1/lucene-join-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-grouping/4.5.1/lucene-grouping-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-grouping/4.6.1/lucene-grouping-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1-sources.jar">
+  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1-sources.jar">
     <attributes>
-      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-spatial/4.5.1/lucene-spatial-4.5.1-javadoc.jar!/" name="javadoc_location"/>
+      <attribute value="jar:file:/home/max/.m2/repository/org/apache/lucene/lucene-spatial/4.6.1/lucene-spatial-4.6.1-javadoc.jar!/" name="javadoc_location"/>
     </attributes>
   </classpathentry>
   <classpathentry kind="var" path="M2_REPO/com/spatial4j/spatial4j/0.3/spatial4j-0.3.jar" sourcepath="M2_REPO/com/spatial4j/spatial4j/0.3/spatial4j-0.3-sources.jar">
diff --git a/pom.xml b/pom.xml
index 6f9b90aa..395c19d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 		<textgrid.httpclients.version>1.3.0-SNAPSHOT</textgrid.httpclients.version>
     		<felix.version>2.3.4</felix.version>
     		<jetty.version>6.1.15</jetty.version>
-    		<elasticsearch.version>0.90.7</elasticsearch.version>
+    		<elasticsearch.version>1.0.1</elasticsearch.version>
 		<antlr-runtime.version>3.2</antlr-runtime.version>
     		<antlr-maven-plugin.version>3.2</antlr-maven-plugin.version>
     	</properties>
-- 
GitLab