Package org.elasticsearch

Examples of org.elasticsearch.ElasticsearchException$WithRestHeaders


        this.name = name;
        this.locale = settings.get("locale", "en_US");
        this.ignoreCase = settings.getAsBoolean("ignoreCase", Boolean.TRUE);
        this.dedup = settings.getAsBoolean("dedup", Boolean.TRUE);
        if (!locales.contains(locale)) {
            throw new ElasticSearchException("invalid locale '" + locale + "' for hunspell aff/dic");
        }
        try {
            InputStream affixStream = HunspellStemFilterFactory.class.getResourceAsStream(locale + ".aff");
            InputStream dictStream = HunspellStemFilterFactory.class.getResourceAsStream(locale + ".dic");
            this.dictionary = new HunspellDictionary(affixStream, dictStream, version, ignoreCase);
View Full Code Here


            return new NodeStoreFilesMetaData(clusterService.state().nodes().localNode(), null);
        }
        try {
            return new NodeStoreFilesMetaData(clusterService.state().nodes().localNode(), listStoreMetaData(request.shardId));
        } catch (IOException e) {
            throw new ElasticSearchException("Failed to list store metadata for shard [" + request.shardId + "]", e);
        }
    }
View Full Code Here

            if (logger.isTraceEnabled()) {
                logger.trace("count of [{}] is [{}]", query, count);
            }
            return count;
        } catch (IOException e) {
            throw new ElasticSearchException("Failed to count query [" + query + "]", e);
        } finally {
            searcher.release();
        }
    }
View Full Code Here

            XContentBuilder builder = XContentFactory.smileBuilder()
                    .startObject().field("query", queryBuilder).endObject();
            BytesStream unsafeBytes = builder.unsafeStream();
            addQuery(name, unsafeBytes.unsafeByteArray(), 0, unsafeBytes.size());
        } catch (IOException e) {
            throw new ElasticSearchException("Failed to add query [" + name + "]", e);
        }
    }
View Full Code Here

                    }
                }
            }
            return query;
        } catch (IOException e) {
            throw new ElasticSearchException("Failed to add query [" + name + "]", e);
        } finally {
            if (parser != null) {
                parser.close();
            }
        }
View Full Code Here

        }
        if (failure.get() != null) {
            if (failure.get() instanceof ElasticSearchException) {
                throw (ElasticSearchException) failure.get();
            } else {
                throw new ElasticSearchException("failed to update mapping", failure.get());
            }
        }
        return new MappingUpdatedResponse();
    }
View Full Code Here

        if (failureRef.get() != null) {
            if (failureRef.get() instanceof ElasticSearchException) {
                throw (ElasticSearchException) failureRef.get();
            } else {
                throw new ElasticSearchException(failureRef.get().getMessage(), failureRef.get());
            }
        }

        return responseRef.get();
    }
View Full Code Here

        if (failureRef.get() != null) {
            if (failureRef.get() instanceof ElasticSearchException) {
                throw (ElasticSearchException) failureRef.get();
            } else {
                throw new ElasticSearchException(failureRef.get().getMessage(), failureRef.get());
            }
        }

        return responseRef.get();
    }
View Full Code Here

        if (failureRef.get() != null) {
            if (failureRef.get() instanceof ElasticSearchException) {
                throw (ElasticSearchException) failureRef.get();
            } else {
                throw new ElasticSearchException(failureRef.get().getMessage(), failureRef.get());
            }
        }

        return new DeleteMappingResponse();
    }
View Full Code Here

        if (failureRef.get() != null) {
            if (failureRef.get() instanceof ElasticSearchException) {
                throw (ElasticSearchException) failureRef.get();
            } else {
                throw new ElasticSearchException(failureRef.get().getMessage(), failureRef.get());
            }
        }

        return responseRef.get();
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.ElasticsearchException$WithRestHeaders

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.