Permalink
Browse files

enhanced debugging

  • Loading branch information...
Orbiter committed May 17, 2017
1 parent 7de7879 commit 3b1d640a3c690021dd070e83dcbd83d4e1657d21
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/net/yacy/search/schema/CollectionSchema.java
@@ -435,13 +435,13 @@ public final void add(final SolrInputDocument doc, final List<?> value) {
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++) {

0 comments on commit 3b1d640

Please sign in to comment.