Skip to content

Commit

Permalink
fix: gene index search
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmona committed Mar 14, 2019
1 parent 8a7b36e commit 5f40682
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/Backend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 5f40682

Please sign in to comment.