From 5f40682c122917d5c4586f91c8e9944037e81c2b Mon Sep 17 00:00:00 2001 From: Miguel C Date: Thu, 14 Mar 2019 13:33:49 +0000 Subject: [PATCH] fix: gene index search --- app/models/Backend.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/Backend.scala b/app/models/Backend.scala index 2a8f366..37034a0 100644 --- a/app/models/Backend.scala +++ b/app/models/Backend.scala @@ -169,7 +169,12 @@ class Backend @Inject()(@NamedDatabase("default") protected val dbConfigProvider }.zip { esQ.execute { search("genes") query boolQuery.should(matchQuery("gene_id", stoken), - matchPhrasePrefixQuery("gene_name", stoken), + matchQuery("gene_name", qString) + .fuzziness("0") + .maxExpansions(20) + .prefixLength(2) + .operator("OR") + .analyzer("autocomplete_search") ) start limitClause._1 limit limitClause._2 } }.map{