Search in sources :

Example 1 with QueryValue

use of io.micronaut.http.annotation.QueryValue in project micronaut-core by micronaut-projects.

the class QueryValueArgumentBinder method bind.

/**
 * Binds the argument with {@link QueryValue} annotation to the request
 * (Also binds without annotation if request body is not permitted).
 *
 * It will first try to convert to ConvertibleMultiValues type and if conversion is successful, add the
 * corresponding parameters to the request. (By default the conversion will be successful if the {@link Format}
 * annotation is present and has one of the supported values - see
 * {@link io.micronaut.core.convert.converters.MultiValuesConverterFactory} for specific converters). Otherwise
 * the uri template will be used to deduce what will be done with the request. For example, simple parameters are
 * converted to {@link String}
 */
@Override
public BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) {
    ConvertibleMultiValues<String> parameters = source.getParameters();
    Argument<T> argument = context.getArgument();
    AnnotationMetadata annotationMetadata = argument.getAnnotationMetadata();
    boolean hasAnnotation = annotationMetadata.hasAnnotation(QueryValue.class);
    HttpMethod httpMethod = source.getMethod();
    boolean permitsRequestBody = HttpMethod.permitsRequestBody(httpMethod);
    BindingResult<T> result;
    if (hasAnnotation || !permitsRequestBody) {
        // First try converting from the ConvertibleMultiValues type and if conversion is successful, return it.
        // Otherwise use the given uri template to deduce what to do with the variable
        Optional<T> multiValueConversion;
        if (annotationMetadata.hasAnnotation(Format.class)) {
            multiValueConversion = conversionService.convert(parameters, context);
        } else {
            multiValueConversion = Optional.empty();
        }
        if (multiValueConversion.isPresent()) {
            result = () -> multiValueConversion;
        } else {
            String parameterName = annotationMetadata.stringValue(QueryValue.class).orElse(argument.getName());
            // If we need to bind all request params to command object
            // checks if the variable is defined with modifier char *, eg. ?pojo*
            boolean bindAll = source.getAttribute(HttpAttributes.ROUTE_MATCH, UriMatchInfo.class).map(umi -> {
                UriMatchVariable uriMatchVariable = umi.getVariableMap().get(parameterName);
                return uriMatchVariable != null && uriMatchVariable.isExploded();
            }).orElse(false);
            if (bindAll) {
                Object value;
                // Only maps and POJOs will "bindAll", lists work like normal
                if (Iterable.class.isAssignableFrom(argument.getType())) {
                    value = doResolve(context, parameters, parameterName);
                    if (value == null) {
                        value = Collections.emptyList();
                    }
                } else {
                    value = parameters.asMap();
                }
                result = doConvert(value, context);
            } else {
                result = doBind(context, parameters, parameterName);
            }
        }
    } else {
        result = BindingResult.EMPTY;
    }
    return result;
}
Also used : ConvertibleMultiValues(io.micronaut.core.convert.value.ConvertibleMultiValues) HttpMethod(io.micronaut.http.HttpMethod) UriMatchVariable(io.micronaut.http.uri.UriMatchVariable) ArgumentConversionContext(io.micronaut.core.convert.ArgumentConversionContext) QueryValue(io.micronaut.http.annotation.QueryValue) AbstractAnnotatedArgumentBinder(io.micronaut.core.bind.annotation.AbstractAnnotatedArgumentBinder) Format(io.micronaut.core.convert.format.Format) UriMatchInfo(io.micronaut.http.uri.UriMatchInfo) Optional(java.util.Optional) AnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata) HttpAttributes(io.micronaut.http.HttpAttributes) Argument(io.micronaut.core.type.Argument) HttpRequest(io.micronaut.http.HttpRequest) ConversionService(io.micronaut.core.convert.ConversionService) Collections(java.util.Collections) QueryValue(io.micronaut.http.annotation.QueryValue) AnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata) UriMatchVariable(io.micronaut.http.uri.UriMatchVariable) HttpMethod(io.micronaut.http.HttpMethod)

Example 2 with QueryValue

use of io.micronaut.http.annotation.QueryValue in project zuliasearch by zuliaio.

the class AssociatedController method getAll.

@Get("/all")
@Produces(MediaType.APPLICATION_JSON)
public HttpResponse<?> getAll(@QueryValue(ZuliaConstants.INDEX) final String indexName, @Nullable @QueryValue(ZuliaConstants.QUERY) String query) {
    ZuliaIndexManager indexManager = ZuliaNodeProvider.getZuliaNode().getIndexManager();
    Writable writable = out -> {
        Document filter;
        if (query != null) {
            filter = Document.parse(query);
        } else {
            filter = new Document();
        }
        try {
            indexManager.getAssociatedFilenames(indexName, out, filter);
        } catch (Exception e) {
            LOG.log(Level.SEVERE, e.getMessage(), e);
            HttpResponse.serverError(e.getMessage());
        }
    };
    return HttpResponse.ok(writable).status(ZuliaConstants.SUCCESS);
}
Also used : Document(org.bson.Document) JsonObject(com.google.gson.JsonObject) StreamingFileUpload(io.micronaut.http.multipart.StreamingFileUpload) StreamedFile(io.micronaut.http.server.types.files.StreamedFile) Produces(io.micronaut.http.annotation.Produces) Level(java.util.logging.Level) TaskExecutors(io.micronaut.scheduling.TaskExecutors) PartData(io.micronaut.http.multipart.PartData) ByteArrayInputStream(java.io.ByteArrayInputStream) MediaType(io.micronaut.http.MediaType) Nullable(io.micronaut.core.annotation.Nullable) Map(java.util.Map) HttpResponse(io.micronaut.http.HttpResponse) Schedulers(reactor.core.scheduler.Schedulers) ZuliaNodeProvider(io.zulia.server.util.ZuliaNodeProvider) MultipartException(io.micronaut.http.multipart.MultipartException) ZuliaIndexManager(io.zulia.server.index.ZuliaIndexManager) Subscriber(org.reactivestreams.Subscriber) ExecutorService(java.util.concurrent.ExecutorService) Get(io.micronaut.http.annotation.Get) ZuliaConstants(io.zulia.ZuliaConstants) ZuliaBase(io.zulia.message.ZuliaBase) OutputStream(java.io.OutputStream) Controller(io.micronaut.http.annotation.Controller) Publisher(org.reactivestreams.Publisher) MutableHttpResponse(io.micronaut.http.MutableHttpResponse) QueryValue(io.micronaut.http.annotation.QueryValue) Mono(reactor.core.publisher.Mono) IOException(java.io.IOException) Logger(java.util.logging.Logger) Post(io.micronaut.http.annotation.Post) Flux(reactor.core.publisher.Flux) JsonArray(com.google.gson.JsonArray) List(java.util.List) Writable(io.micronaut.core.io.Writable) Subscription(org.reactivestreams.Subscription) Inject(jakarta.inject.Inject) Named(jakarta.inject.Named) InputStream(java.io.InputStream) ZuliaIndexManager(io.zulia.server.index.ZuliaIndexManager) Writable(io.micronaut.core.io.Writable) Document(org.bson.Document) MultipartException(io.micronaut.http.multipart.MultipartException) IOException(java.io.IOException) Produces(io.micronaut.http.annotation.Produces) Get(io.micronaut.http.annotation.Get)

Example 3 with QueryValue

use of io.micronaut.http.annotation.QueryValue in project zuliasearch by zuliaio.

the class QueryController method get.

@Get
@Produces({ MediaType.APPLICATION_JSON + ";charset=utf-8", MediaType.TEXT_PLAIN + ";charset=utf-8" })
public HttpResponse<?> get(@QueryValue(ZuliaConstants.INDEX) List<String> indexName, @QueryValue(value = ZuliaConstants.QUERY, defaultValue = "*:*") String query, @Nullable @QueryValue(ZuliaConstants.QUERY_FIELD) List<String> queryFields, @Nullable @QueryValue(ZuliaConstants.FILTER_QUERY) List<String> filterQueries, @Nullable @QueryValue(ZuliaConstants.QUERY_JSON) List<String> queryJsonList, @Nullable @QueryValue(ZuliaConstants.FIELDS) List<String> fields, @QueryValue(value = ZuliaConstants.FETCH, defaultValue = "true") Boolean fetch, @QueryValue(value = ZuliaConstants.ROWS, defaultValue = "0") Integer rows, @Nullable @QueryValue(ZuliaConstants.FACET) List<String> facet, @Nullable @QueryValue(ZuliaConstants.DRILL_DOWN) List<String> drillDowns, @Nullable @QueryValue(ZuliaConstants.DEFAULT_OP) String defaultOperator, @Nullable @QueryValue(ZuliaConstants.SORT) List<String> sort, @QueryValue(value = ZuliaConstants.PRETTY, defaultValue = "true") Boolean pretty, @Nullable @QueryValue(value = ZuliaConstants.DISMAX, defaultValue = "false") Boolean dismax, @Nullable @QueryValue(ZuliaConstants.DISMAX_TIE) Float dismaxTie, @Nullable @QueryValue(ZuliaConstants.MIN_MATCH) Integer mm, @Nullable @QueryValue(ZuliaConstants.SIMILARITY) List<String> similarity, @QueryValue(value = ZuliaConstants.DEBUG, defaultValue = "false") Boolean debug, @QueryValue(value = ZuliaConstants.DONT_CACHE, defaultValue = "true") Boolean dontCache, @Nullable @QueryValue(ZuliaConstants.START) Integer start, @Nullable @QueryValue(ZuliaConstants.HIGHLIGHT) List<String> highlightList, @Nullable @QueryValue(ZuliaConstants.HIGHLIGHT_JSON) List<String> highlightJsonList, @Nullable @QueryValue(ZuliaConstants.ANALYZE_JSON) List<String> analyzeJsonList, @QueryValue(value = ZuliaConstants.FORMAT, defaultValue = "json") String format, @QueryValue(value = ZuliaConstants.BATCH, defaultValue = "false") Boolean batch, @QueryValue(value = ZuliaConstants.BATCH_SIZE, defaultValue = "500") Integer batchSize, @Nullable @QueryValue(ZuliaConstants.CURSOR) String cursor, @QueryValue(value = ZuliaConstants.TRUNCATE, defaultValue = "false") Boolean truncate) {
    ZuliaIndexManager indexManager = ZuliaNodeProvider.getZuliaNode().getIndexManager();
    QueryRequest.Builder qrBuilder = QueryRequest.newBuilder().addAllIndex(indexName);
    try {
        boolean outputCursor = false;
        if (cursor != null) {
            if (!cursor.equals("0")) {
                qrBuilder.setLastResult(CursorHelper.getLastResultFromCursor(cursor));
            }
            outputCursor = true;
            if (sort == null || sort.isEmpty()) {
                return HttpResponse.created("Sort on unique value or value combination is required to use a cursor (i.e. id or title,id)").status(ZuliaConstants.INTERNAL_ERROR);
            }
        }
        if (debug != null) {
            qrBuilder.setDebug(debug);
        }
        if (start != null) {
            qrBuilder.setStart(start);
        }
        if (dontCache != null) {
            qrBuilder.setDontCache(dontCache);
        }
        Query.Builder mainQueryBuilder = Query.newBuilder();
        if (query != null) {
            mainQueryBuilder.setQ(query);
        }
        if (mm != null) {
            mainQueryBuilder.setMm(mm);
        }
        if (dismax != null) {
            mainQueryBuilder.setDismax(dismax);
            if (dismaxTie != null) {
                mainQueryBuilder.setDismaxTie(dismaxTie);
            }
        }
        if (queryFields != null) {
            mainQueryBuilder.addAllQf(queryFields);
        }
        if (defaultOperator != null) {
            if (defaultOperator.equalsIgnoreCase("AND")) {
                mainQueryBuilder.setDefaultOp(Query.Operator.AND);
            } else if (defaultOperator.equalsIgnoreCase("OR")) {
                mainQueryBuilder.setDefaultOp(Query.Operator.OR);
            } else {
                HttpResponse.created("Invalid default operator <" + defaultOperator + ">").status(ZuliaConstants.INTERNAL_ERROR);
            }
        }
        mainQueryBuilder.setQueryType(Query.QueryType.SCORE_MUST);
        qrBuilder.addQuery(mainQueryBuilder);
        if (similarity != null) {
            for (String sim : similarity) {
                if (sim.contains(":")) {
                    int i = sim.indexOf(":");
                    String field = sim.substring(0, i);
                    String simType = sim.substring(i + 1);
                    FieldSimilarity.Builder fieldSimilarity = FieldSimilarity.newBuilder();
                    fieldSimilarity.setField(field);
                    if (simType.equalsIgnoreCase("bm25")) {
                        fieldSimilarity.setSimilarity(Similarity.BM25);
                    } else if (simType.equalsIgnoreCase("constant")) {
                        fieldSimilarity.setSimilarity(Similarity.CONSTANT);
                    } else if (simType.equalsIgnoreCase("tf")) {
                        fieldSimilarity.setSimilarity(Similarity.TF);
                    } else if (simType.equalsIgnoreCase("tfidf")) {
                        fieldSimilarity.setSimilarity(Similarity.TFIDF);
                    } else {
                        HttpResponse.created("Unknown similarity type <" + simType + ">").status(ZuliaConstants.INTERNAL_ERROR);
                    }
                    qrBuilder.addFieldSimilarity(fieldSimilarity);
                } else {
                    HttpResponse.created("Similarity <" + sim + "> should be in the form field:simType").status(ZuliaConstants.INTERNAL_ERROR);
                }
            }
        }
        if (filterQueries != null) {
            for (String filterQuery : filterQueries) {
                Query filterQueryBuilder = Query.newBuilder().setQ(filterQuery).setQueryType(Query.QueryType.FILTER).build();
                qrBuilder.addQuery(filterQueryBuilder);
            }
        }
        if (queryJsonList != null) {
            for (String queryJson : queryJsonList) {
                try {
                    Query.Builder subQueryBuilder = Query.newBuilder();
                    JsonFormat.parser().merge(queryJson, subQueryBuilder);
                    qrBuilder.addQuery(subQueryBuilder);
                } catch (InvalidProtocolBufferException e) {
                    return HttpResponse.created("Failed to parse query json: " + e.getClass().getSimpleName() + ":" + e.getMessage()).status(ZuliaConstants.INTERNAL_ERROR);
                }
            }
        }
        if (highlightList != null) {
            for (String hl : highlightList) {
                HighlightRequest highlightRequest = HighlightRequest.newBuilder().setField(hl).build();
                qrBuilder.addHighlightRequest(highlightRequest);
            }
        }
        if (highlightJsonList != null) {
            for (String hlJson : highlightJsonList) {
                try {
                    HighlightRequest.Builder hlBuilder = HighlightRequest.newBuilder();
                    JsonFormat.parser().merge(hlJson, hlBuilder);
                    qrBuilder.addHighlightRequest(hlBuilder);
                } catch (InvalidProtocolBufferException e) {
                    return HttpResponse.created("Failed to parse highlight json: " + e.getClass().getSimpleName() + ":" + e.getMessage()).status(ZuliaConstants.INTERNAL_ERROR);
                }
            }
        }
        if (analyzeJsonList != null) {
            for (String alJson : analyzeJsonList) {
                try {
                    AnalysisRequest.Builder analyzeRequestBuilder = AnalysisRequest.newBuilder();
                    JsonFormat.parser().merge(alJson, analyzeRequestBuilder);
                    qrBuilder.addAnalysisRequest(analyzeRequestBuilder);
                } catch (InvalidProtocolBufferException e) {
                    return HttpResponse.created("Failed to parse analyzer json: " + e.getClass().getSimpleName() + ":" + e.getMessage()).status(ZuliaConstants.INTERNAL_ERROR);
                }
            }
        }
        if (fields != null) {
            for (String field : fields) {
                if (field.startsWith("-")) {
                    qrBuilder.addDocumentMaskedFields(field.substring(1));
                } else {
                    qrBuilder.addDocumentFields(field);
                }
            }
        }
        qrBuilder.setResultFetchType(FetchType.FULL);
        if (fetch != null && !fetch) {
            qrBuilder.setResultFetchType(FetchType.NONE);
        }
        FacetRequest.Builder frBuilder = FacetRequest.newBuilder();
        if (facet != null) {
            for (String f : facet) {
                Integer count = null;
                if (f.contains(":")) {
                    String countString = f.substring(f.indexOf(":") + 1);
                    f = f.substring(0, f.indexOf(":"));
                    try {
                        count = Integer.parseInt(countString);
                    } catch (Exception e) {
                        return HttpResponse.created("Invalid facet count <" + countString + "> for facet <" + f + ">").status(ZuliaConstants.INTERNAL_ERROR);
                    }
                }
                CountRequest.Builder countBuilder = CountRequest.newBuilder();
                Facet zuliaFacet = Facet.newBuilder().setLabel(f).build();
                CountRequest.Builder facetBuilder = countBuilder.setFacetField(zuliaFacet);
                if (count != null) {
                    facetBuilder.setMaxFacets(count);
                }
                frBuilder.addCountRequest(facetBuilder);
            }
        }
        if (drillDowns != null) {
            for (String drillDown : drillDowns) {
                if (drillDown.contains(":")) {
                    String value = drillDown.substring(drillDown.indexOf(":") + 1);
                    String field = drillDown.substring(0, drillDown.indexOf(":"));
                    frBuilder.addDrillDown(Facet.newBuilder().setLabel(field).setValue(value));
                }
            }
        }
        qrBuilder.setFacetRequest(frBuilder);
        if (sort != null) {
            SortRequest.Builder sortRequest = SortRequest.newBuilder();
            for (String sortField : sort) {
                FieldSort.Builder fieldSort = FieldSort.newBuilder();
                if (sortField.contains(":")) {
                    String sortDir = sortField.substring(sortField.indexOf(":") + 1);
                    sortField = sortField.substring(0, sortField.indexOf(":"));
                    if ("-1".equals(sortDir) || "DESC".equalsIgnoreCase(sortDir)) {
                        fieldSort.setDirection(FieldSort.Direction.DESCENDING);
                    } else if ("1".equals(sortDir) || "ASC".equalsIgnoreCase(sortDir)) {
                        fieldSort.setDirection(FieldSort.Direction.ASCENDING);
                    } else {
                        return HttpResponse.created("Invalid sort direction <" + sortDir + "> for field <" + sortField + ">.  Expecting -1/1 or DESC/ASC").status(ZuliaConstants.INTERNAL_ERROR);
                    }
                }
                fieldSort.setSortField(sortField);
                sortRequest.addFieldSort(fieldSort);
            }
            qrBuilder.setSortRequest(sortRequest);
        }
        qrBuilder.setAmount(rows);
        if (format.equals("json")) {
            QueryResponse qr = indexManager.query(qrBuilder.build());
            String response = getStandardResponse(qr, !pretty, outputCursor, truncate);
            if (pretty) {
                response = JsonWriter.formatJson(response);
            }
            return HttpResponse.ok(response).status(ZuliaConstants.SUCCESS).contentType(MediaType.APPLICATION_JSON_TYPE);
        } else {
            if (fields != null && !fields.isEmpty()) {
                if (batch) {
                    qrBuilder.setAmount(batchSize);
                    Writable writable = output -> {
                        try {
                            QueryResponse qr = indexManager.query(qrBuilder.build());
                            String header = buildHeaderForCSV(fields);
                            output.write(header);
                            output.flush();
                            int count = 0;
                            while (qr.getResultsList().size() > 0) {
                                for (ScoredResult scoredResult : qr.getResultsList()) {
                                    Document doc = ResultHelper.getDocumentFromScoredResult(scoredResult);
                                    appendDocument(fields, null, output, doc);
                                    count++;
                                    if (count % 1000 == 0) {
                                        LOG.info("Docs processed so far: " + count);
                                    }
                                }
                                qrBuilder.setLastResult(qr.getLastResult());
                                qr = indexManager.query(qrBuilder.build());
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    };
                    LocalDateTime now = LocalDateTime.now();
                    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-H-mm-ss");
                    return HttpResponse.ok(writable).status(ZuliaConstants.SUCCESS).header("content-disposition", "attachment; filename = " + "zuliaDownload_" + now.format(formatter) + ".csv").contentType(MediaType.APPLICATION_OCTET_STREAM);
                } else {
                    QueryResponse qr = indexManager.query(qrBuilder.build());
                    String response = getCSVDocumentResponse(fields, qr);
                    return HttpResponse.ok(response).status(ZuliaConstants.SUCCESS).contentType(MediaType.TEXT_PLAIN + ";charset=utf-8");
                }
            } else if (facet != null && !facet.isEmpty() && rows == 0) {
                QueryResponse qr = indexManager.query(qrBuilder.build());
                StringBuilder response = new StringBuilder();
                response.append("facetName,facetKey,facetValue\n");
                for (FacetGroup facetGroup : qr.getFacetGroupList()) {
                    for (FacetCount facetCount : facetGroup.getFacetCountList()) {
                        response.append(facetGroup.getCountRequest().getFacetField().getLabel());
                        response.append(",");
                        response.append("\"").append(facetCount.getFacet()).append("\"");
                        response.append(",");
                        response.append(Long.valueOf(facetCount.getCount()));
                        response.append("\n");
                    }
                }
                return HttpResponse.ok(response.toString()).status(ZuliaConstants.SUCCESS).contentType(MediaType.TEXT_PLAIN + ";charset=utf-8");
            } else {
                return HttpResponse.ok("Please specify fields to be exported i.e. fl=title&fl=abstract or the facets to be exported i.e. facet=issn&facet=pubYear&rows=0").status(ZuliaConstants.SUCCESS).contentType(MediaType.TEXT_PLAIN + ";charset=utf-8");
            }
        }
    } catch (Exception e) {
        LOG.log(Level.SEVERE, e.getMessage(), e);
        return HttpResponse.serverError(e.getClass().getSimpleName() + ":" + e.getMessage()).status(ZuliaConstants.INTERNAL_ERROR);
    }
}
Also used : Document(org.bson.Document) Parameter(io.micronaut.context.annotation.Parameter) Date(java.util.Date) Produces(io.micronaut.http.annotation.Produces) LocalDateTime(java.time.LocalDateTime) JsonWriterSettings(org.bson.json.JsonWriterSettings) Level(java.util.logging.Level) ResultHelper(io.zulia.util.ResultHelper) QueryResponse(io.zulia.message.ZuliaServiceOuterClass.QueryResponse) MediaType(io.micronaut.http.MediaType) Nullable(io.micronaut.core.annotation.Nullable) HttpResponse(io.micronaut.http.HttpResponse) ZuliaNodeProvider(io.zulia.server.util.ZuliaNodeProvider) ZuliaIndexManager(io.zulia.server.index.ZuliaIndexManager) Get(io.micronaut.http.annotation.Get) ZuliaConstants(io.zulia.ZuliaConstants) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) Controller(io.micronaut.http.annotation.Controller) QueryValue(io.micronaut.http.annotation.QueryValue) Logger(java.util.logging.Logger) QueryRequest(io.zulia.message.ZuliaServiceOuterClass.QueryRequest) TermOrBuilder(io.zulia.message.ZuliaBase.TermOrBuilder) List(java.util.List) JsonFormat(com.google.protobuf.util.JsonFormat) Writable(io.micronaut.core.io.Writable) DateTimeFormatter(java.time.format.DateTimeFormatter) Writer(java.io.Writer) Similarity(io.zulia.message.ZuliaBase.Similarity) ZuliaQuery(io.zulia.message.ZuliaQuery) JsonWriter(com.cedarsoftware.util.io.JsonWriter) CursorHelper(io.zulia.util.CursorHelper) LocalDateTime(java.time.LocalDateTime) ZuliaQuery(io.zulia.message.ZuliaQuery) Writable(io.micronaut.core.io.Writable) Document(org.bson.Document) ZuliaIndexManager(io.zulia.server.index.ZuliaIndexManager) QueryRequest(io.zulia.message.ZuliaServiceOuterClass.QueryRequest) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) QueryResponse(io.zulia.message.ZuliaServiceOuterClass.QueryResponse) DateTimeFormatter(java.time.format.DateTimeFormatter) Produces(io.micronaut.http.annotation.Produces) Get(io.micronaut.http.annotation.Get)

Aggregations

QueryValue (io.micronaut.http.annotation.QueryValue)3 Nullable (io.micronaut.core.annotation.Nullable)2 Writable (io.micronaut.core.io.Writable)2 HttpResponse (io.micronaut.http.HttpResponse)2 MediaType (io.micronaut.http.MediaType)2 Controller (io.micronaut.http.annotation.Controller)2 Get (io.micronaut.http.annotation.Get)2 Produces (io.micronaut.http.annotation.Produces)2 ZuliaConstants (io.zulia.ZuliaConstants)2 ZuliaIndexManager (io.zulia.server.index.ZuliaIndexManager)2 ZuliaNodeProvider (io.zulia.server.util.ZuliaNodeProvider)2 List (java.util.List)2 Level (java.util.logging.Level)2 Logger (java.util.logging.Logger)2 Document (org.bson.Document)2 JsonWriter (com.cedarsoftware.util.io.JsonWriter)1 JsonArray (com.google.gson.JsonArray)1 JsonObject (com.google.gson.JsonObject)1 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 JsonFormat (com.google.protobuf.util.JsonFormat)1