This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.kafka.annotation.KafkaListener | |
import org.springframework.stereotype.Component | |
@Component | |
class FileChangedListener { | |
@KafkaListener(topics = ["changed_files"]) | |
fun listen(file: String) { | |
// Process the file here | |
uploadFileToSFTP(file) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.cloud.vision.v1.AnnotateImageRequest | |
import com.google.cloud.vision.v1.Feature | |
import com.google.cloud.vision.v1.Image | |
import com.google.cloud.vision.v1.ImageAnnotatorClient | |
import com.google.cloud.vision.v1.TextAnnotation | |
import com.google.protobuf.ByteString | |
import com.google.cloud.language.v1.LanguageServiceClient | |
import com.google.cloud.language.v1.Document | |
import com.google.cloud.language.v1.AnalyzeSyntaxRequest | |
import org.springframework.beans.factory.annotation.Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.http.MediaType | |
import org.springframework.http.ResponseEntity | |
import org.springframework.validation.annotation.Validated | |
import org.springframework.web.bind.annotation.PostMapping | |
import org.springframework.web.bind.annotation.RequestBody | |
import org.springframework.web.bind.annotation.RequestMapping | |
import org.springframework.web.bind.annotation.RestController | |
import org.springframework.web.multipart.MultipartFile | |
import javax.validation.constraints.NotNull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.cloud.vision.v1.AnnotateImageRequest | |
import com.google.cloud.vision.v1.Feature | |
import com.google.cloud.vision.v1.Image | |
import com.google.cloud.vision.v1.ImageAnnotatorClient | |
import com.google.protobuf.ByteString | |
import org.springframework.beans.factory.annotation.Value | |
import org.springframework.http.MediaType | |
import org.springframework.http.ResponseEntity | |
import org.springframework.validation.annotation.Validated | |
import org.springframework.web.bind.annotation.PostMapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET .ent-search-actastic-engines_v9/_search | |
{ | |
"query": { | |
"bool": { | |
"filter": [ | |
{ | |
"terms": { | |
"loco_moco_account_id": [ | |
"600306ca4ee3595c7ff4ed1a" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"alerts": [], | |
"warnings": [], | |
"page": { | |
"current": 1, | |
"total_pages": 1, | |
"total_results": 3, | |
"size": 10 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": "United Kingdom", | |
"page": { | |
"current": 1, | |
"size": 10 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "London", | |
"country": "United Kingdom" | |
}, | |
{ | |
"name": "Liverpool", | |
"country": "United Kingdom" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val engineName = "f1drivers2020" | |
val client = DefaultClient(url = "http://localhost:3002", apiKey = apiKey) | |
val sr = SearchRequest(query = "ferrari") | |
val resp = client.search.search(engineName, searchRequest = sr) | |
resp.results.forEach { println(it) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
es01: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1 | |
container_name: es01 | |
environment: | |
- node.name=es01 | |
- cluster.name=es-docker-cluster | |
- discovery.seed_hosts=es02,es03 | |
- cluster.initial_master_nodes=es01,es02,es03 |
NewerOlder