All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.zulia.server.index.field.FieldIndexer Maven / Gradle / Ivy

There is a newer version: 1.6.4
Show newest version
package io.zulia.server.index.field;

import io.zulia.util.ZuliaUtil;
import org.apache.lucene.document.Document;

public abstract class FieldIndexer {

	protected FieldIndexer() {

	}

	public void index(Document document, String storedFieldName, Object storedValue, String indexedFieldName) throws Exception {

		ZuliaUtil.handleLists(storedValue, obj -> {
			try {
				handleValue(document, storedFieldName, obj, indexedFieldName);
			}
			catch (Exception e) {
				throw new RuntimeException(e);
			}
		});

	}

	protected abstract void handleValue(Document d, String storedFieldName, Object value, String indexedFieldName) throws Exception;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy