Project

General

Profile

« Previous | Next » 

Revision 8756

allow multivalued fields to be indexed using the "fields" pass through.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
418 418
	        for (String fieldName: fields.keySet()) {
419 419
	    		List<Object> values = fields.get(fieldName);
420 420
	    		for (Object value: values) {
421
	    	    	doc.updateOrAddField(fieldName, value.toString());
421
	    			if (!doc.hasFieldWithValue(fieldName, value.toString())) {
422
		    			doc.addField(new SolrElementField(fieldName, value.toString()));
423
	    			}
424
	    	    	//doc.updateOrAddField(fieldName, value.toString());
422 425
	    		}
423 426
	    	}
424 427
	        

Also available in: Unified diff