diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-15 18:57:02 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-15 18:57:02 -0400 |
commit | 4c127ddd32b20bc6f1e6fb6b921e06cf3de4f1ca (patch) | |
tree | 0b98acad45d97e101f51f7982b0e956173fee55c | |
parent | f761646e474b2ca83aeca1fa4821fef78c12d015 (diff) |
added proto filter to search
-rw-r--r-- | src/client/views/search/SearchBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 7bfe0bb13..3830a6d16 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -118,7 +118,7 @@ export class SearchBox extends React.Component { private get filterQuery() { const types = FilterBox.Instance.filterTypes; - return types && types.map(type => `({!join from=id to=proto_i}type_t:"${type}" AND NOT type_t:*) OR type_t:"${type}"`).join(" "); + return "proto_i:*" + (types ? ` AND (${types.map(type => `({!join from=id to=proto_i}type_t:"${type}" AND NOT type_t:*) OR type_t:"${type}"`).join(" ")})` : ""); } |