Skip to content

Commit 54c7125

Browse files
committed
Fix wildcard query
1 parent 50dc5ba commit 54c7125

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/main/scala/alpakka/sse_to_elasticsearch/WikipediaEditsAnalyser.scala

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ object WikipediaEditsAnalyser extends App {
9292
}
9393

9494
// Set to false for now, because local Ollama is still experimental
95-
private val useLocalOllamaNER: Boolean = true
95+
private val useLocalOllamaNER: Boolean = false
9696

9797
// Switch off at runtime via UI to save costs
9898
private val isRemoteProcessingEnabled = new AtomicBoolean(true)
@@ -674,8 +674,20 @@ object WikipediaEditsAnalyser extends App {
674674
val wildcard = "**"
675675
val searchQuery = if (query.equals(wildcard)) {
676676
"""{
677-
"exists": {
678-
"field": "personsFoundLocal"
677+
"bool": {
678+
"should": [
679+
{
680+
"exists": {
681+
"field": "personsFoundLocal"
682+
}
683+
},
684+
{
685+
"exists": {
686+
"field": "personsFoundRemote"
687+
}
688+
}
689+
],
690+
"minimum_should_match": 1
679691
}
680692
}"""
681693
} else {

0 commit comments

Comments
 (0)