com.scaleset.search.es.SearchMapping Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaleset-search Show documentation
Show all versions of scaleset-search Show documentation
Java object model for representing query requests in REST protocols.
package com.scaleset.search.es;
import org.elasticsearch.search.SearchHit;
import com.scaleset.search.Query;
public interface SearchMapping {
T fromDocument(String id, String doc) throws Exception;
T fromSearchHit(SearchHit hit) throws Exception;
String id(T obj) throws Exception;
String idForKey(K key) throws Exception;
String index(T object) throws Exception;
String indexForKey(K key) throws Exception;
String indexForQuery(Query query) throws Exception;
String[] indicesForQuery(Query query) throws Exception;
String toDocument(T obj) throws Exception;
String type(T object) throws Exception;
String typeForKey(K key) throws Exception;
String[] typesForQuery(Query query) throws Exception;
}