From 3b1d640a3c690021dd070e83dcbd83d4e1657d21 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 18 May 2017 00:28:12 +0200 Subject: [PATCH] enhanced debugging --- source/net/yacy/search/schema/CollectionSchema.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/net/yacy/search/schema/CollectionSchema.java b/source/net/yacy/search/schema/CollectionSchema.java index 59247ee57..52a35e1b1 100644 --- a/source/net/yacy/search/schema/CollectionSchema.java +++ b/source/net/yacy/search/schema/CollectionSchema.java @@ -435,13 +435,13 @@ public enum CollectionSchema implements SchemaDeclaration { return; } if (this.type == SolrType.num_integer) { - assert (value.iterator().next() instanceof Integer); + assert (value.iterator().next() instanceof Integer) : "type: " + value.iterator().next().getClass().getName(); doc.setField(this.getSolrFieldName(), value.toArray(new Integer[value.size()])); } else if (this.type == SolrType.string || this.type == SolrType.text_general) { - assert (value.iterator().next() instanceof String); + assert (value.iterator().next() instanceof String) : "type: " + value.iterator().next().getClass().getName(); doc.setField(this.getSolrFieldName(), value.toArray(new String[value.size()])); } else if (this.type == SolrType.date) { - assert (value.iterator().next() instanceof String) || (value.iterator().next() instanceof Date); + assert (value.iterator().next() instanceof String) || (value.iterator().next() instanceof Date) : "type: " + value.iterator().next().getClass().getName(); if (value.iterator().next() instanceof String) { Date[] da = new Date[value.size()]; for (int i = 0; i < value.size(); i++) {