manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rh...@apache.org
Subject svn commit: r1666485 - /manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
Date Fri, 13 Mar 2015 15:48:37 GMT
Author: rharo
Date: Fri Mar 13 15:48:37 2015
New Revision: 1666485

URL: http://svn.apache.org/r1666485
Log:
CONNECTORS-1168 Fixed a bug in the RD-SearchBlox Metadata management

Modified:
    manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java

Modified: manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java?rev=1666485&r1=1666484&r2=1666485&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
(original)
+++ manifoldcf/branches/CONNECTORS-1168/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
Fri Mar 13 15:48:37 2015
@@ -97,7 +97,6 @@ public class SearchBloxDocument {
 		this.uid = documentURI;
 		this.colName = args.get(SEARCHBLOX_COLLECTION).get(0);
 
-		data_fields.put(xmlElements.get(8), "" + rd.getBinaryLength());
 		Date date = rd.getModifiedDate();
 		if(date!=null){
 			data_fields.put(xmlElements.get(7),
@@ -120,6 +119,9 @@ public class SearchBloxDocument {
 
 		// Content Type
 		data_fields.put(xmlElements.get(10), rd.getMimeType());
+		
+		// Size
+		data_fields.put(xmlElements.get(8), "" + rd.getBinaryLength());
 
 		// Boosting
 		for(String boostId:args.keySet()){
@@ -139,7 +141,12 @@ public class SearchBloxDocument {
 				String[] values = rd.getFieldAsStrings(name);
 				for (String value : values) {
 					String key = name.toLowerCase();
-					if (xmlElements.contains(key)) {
+					int indexOf = xmlElements.indexOf(key); 
+					if (indexOf != -1 && 
+							indexOf != 0 &&
+							indexOf != 5 &&
+							indexOf != 7 && 
+							indexOf != 8) {
 						data_fields.put(key, value);
 					} else
 						metadata.put(name, value);



Mime
View raw message