Search in sources :

Example 1 with ElasticSearchResult

use of com.dexels.navajo.elasticsearch.impl.ElasticSearchResult in project navajo by Dexels.

the class ElasticSearchQueryAdapter method getEsrarray.

public ElasticSearchResult[] getEsrarray() throws MappableException {
    try {
        result = ElasticSearchQueryFactory.getInstance().search(keyword);
        for (ElasticSearchResult element : result) {
            System.out.println("id: " + element.id);
            System.out.println("score: " + element.score);
            System.out.println("filename: " + element.fileName);
        }
    } catch (IOException e) {
        throw new MappableException("error " + e);
    }
    return result;
}
Also used : ElasticSearchResult(com.dexels.navajo.elasticsearch.impl.ElasticSearchResult) MappableException(com.dexels.navajo.script.api.MappableException) IOException(java.io.IOException)

Aggregations

ElasticSearchResult (com.dexels.navajo.elasticsearch.impl.ElasticSearchResult)1 MappableException (com.dexels.navajo.script.api.MappableException)1 IOException (java.io.IOException)1