diff --git a/core/app/datasource/src/main/java/io/openk9/datasource/searcher/SearcherService.java b/core/app/datasource/src/main/java/io/openk9/datasource/searcher/SearcherService.java index 53b611140..ad5ef6a0c 100644 --- a/core/app/datasource/src/main/java/io/openk9/datasource/searcher/SearcherService.java +++ b/core/app/datasource/src/main/java/io/openk9/datasource/searcher/SearcherService.java @@ -544,20 +544,10 @@ public Uni queryAnalysis(QueryAnalysisRequest request) { for (SemanticType maps : semanticTypeList) { for (Map map : maps) { Object tokenType = map.get("tokenType"); - String value = (String) map.get("value"); int startPos = maps.getPos().get(0); - int endPos = maps.getPos().get(1); - logger.info(startPos); -// if (!value.startsWith(searchText) -// && (tokenType.equals("TEXT"))) { -// continue; -// } - - if (startPos > 0 && searchText.contains(value)) { - continue; - } + Object keywordKey = map.get("keywordKey"); - if (endPos > 8) { + if (startPos > 0 || keywordKey != null) { continue; } diff --git a/core/app/datasource/src/main/java/io/openk9/datasource/searcher/queryanalysis/annotator/BaseAutoCompleteAnnotator.java b/core/app/datasource/src/main/java/io/openk9/datasource/searcher/queryanalysis/annotator/BaseAutoCompleteAnnotator.java index 7d34499da..8c35c053a 100644 --- a/core/app/datasource/src/main/java/io/openk9/datasource/searcher/queryanalysis/annotator/BaseAutoCompleteAnnotator.java +++ b/core/app/datasource/src/main/java/io/openk9/datasource/searcher/queryanalysis/annotator/BaseAutoCompleteAnnotator.java @@ -259,7 +259,7 @@ private boolean _arrayContains( @Override public int getLastTokenCount() { - return 5; + return 6; } } \ No newline at end of file