Reputation: 1
Im developing an api to show the results of a query in elasticsearch and im getting some imports error. Example of result:
{
"took": 136,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 3,
"relation": "eq"
},
"max_score": 10.896778,
"hits": [
{
"_index": "wikipedia",
"_id": "25682",
"_score": 10.896778,
"_source": {
"title": "Random binary tree",
"url": "https://en.wikipedia.org/wiki/Random_binary_tree",
"content": "Random binary tree In computer science and probability theory, a random binary tree is a binary tree selected at random from some probability distribution on binary trees. Two different distributions are commonly used: binary trees formed by inserting nodes one at a time according to a random permutation, and binary trees chosen from a uniform discrete distribution in which all distinct trees are equally likely. It is also possible to form other distributions, for instance by repeated splitting.",
"dt_creation": "2015-12-19",
"reading_time": 11
}
},
{
"_index": "wikipedia",
"_id": "3718",
"_score": 10.62151,
"_source": {
"title": "Treap",
"url": "https://en.wikipedia.org/wiki/Treap",
"content": "In computer science, the treap and the randomized binary search tree are two closely related forms of binary search tree data structures that maintain a dynamic set of ordered keys and allow binary searches among the keys. After any sequence of insertions and deletions of keys, the shape of the tree is a random variable with the same probability distribution as a random binary tree; in particular, with high probability its height is proportional to the logarithm of the number of keys, so that ea",
"dt_creation": "2019-12-25",
"reading_time": 12
}
},
{
"_index": "wikipedia",
"_id": "36690",
"_score": 8.173512,
"_source": {
"title": "Janson inequality",
"url": "https://en.wikipedia.org/wiki/Janson_inequality",
"content": """In the mathematical theory of probability, Janson's inequality is a collection of related inequalities giving an exponential bound on the probability of many related events happening simultaneously by their pairwise dependence. Informally Janson's inequality involves taking a sample of many independent random binary variables, and a set of subsets of those variables and bounding the probability that the sample will contain any of those subsets by their pairwise correlation. Statement Let <som1>\""",
"dt_creation": "2015-07-08",
"reading_time": 3
}
}
]
},
"suggest": {
"my-suggestion": [
{
"text": "random",
"offset": 0,
"length": 10,
"options": []
},
{
"text": "binar",
"offset": 11,
"length": 5,
"options": [
{
"text": "binari",
"score": 0.8,
"freq": 390
},
{
"text": "benar",
"score": 0.8,
"freq": 1
}
]
},
{
"text": "tree",
"offset": 17,
"length": 4,
"options": []
}
]
}
}
And i have the following api.yml
openapi: '3.0.0'
info:
version: '1.0.0'
title: 'Sample API'
description: Initial example to submit Elasticsearch queries
paths:
/search:
get:
summary: 'Submits a query to Elasticsearch'
operationId: search
tags:
- search
parameters:
- name: query
in: query
description: Query to be submitted
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Result'
500:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Result:
type: object
properties:
Hits:
type: object
properties:
title:
type: string
url:
type: string
abs:
type: string
dt_creation:
type: string
suggest:
type: string
Error:
type: object
required:
- message
properties:
message:
description: A human readable error message
type: string
When i run, i got this type of error: -java: package com.google.gson does not exist This package is auto generated, so i dont know what is going on
Please, help me!
Upvotes: 0
Views: 39