google / zoekt

Fast trigram based code search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow short pattern in conjunction

hanwen opened this issue · comments

pattern "at" too short. Did you mean "r:gerrit Pushing requires being at least project owner" ?

We can search for this efficiently because we have other trigrams. Transform into a brute force substring if there are other trigrams in the conjunction.

commit 9b1beea
Author: Han-Wen Nienhuys hanwen@google.com
Date: Tue May 30 19:17:02 2017 +0200

Allow short queries in query parser too.

Change-Id: If91135b3ca2dcd1f012a0fad8837a968c3931b05

commit c3cfa0c
Author: Han-Wen Nienhuys hanwen@google.com
Date: Tue May 30 19:08:18 2017 +0200

Process short substring queries too.

This is implemented as a regexpMatchTree with a bruteForceMatchTree as
child.

Change-Id: Ie9b9ce44120f2f776eab4a32cbf914bafc95ae7e

this works now, but seems too slow. "spinazie" => very fast, [spinazie f:en] => slow, even though the first atom should basically filter out everything.