File tree Expand file tree Collapse file tree 3 files changed +77
-1
lines changed
transcripts/share-apis/search Expand file tree Collapse file tree 3 files changed +77
-1
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ searchDefinitionsEndpoint callerUserId (Query query) mayLimit userFilter project
443
443
[" :" ] -> pure $ []
444
444
-- If the query is a single word, and it doesn't contain "->", we treat it as a name search
445
445
[name]
446
- | not (Text. isInfixOf " ->" name) ->
446
+ | not (Text. isInfixOf " ->" name) && not ( Text. isInfixOf " # " name) ->
447
447
PG. runTransactionMode PG. ReadCommitted PG. Read $
448
448
DDQ. definitionNameSearch callerUserId filter limit (Query name)
449
449
_ -> do
Original file line number Diff line number Diff line change
1
+ {
2
+ "body" : {
3
+ "results" : [
4
+ {
5
+ "branchRef" : " releases/1.2.3" ,
6
+ "definition" : {
7
+ "displayName" : " function.const" ,
8
+ "hash" : " #20991ok5ht19nlsedaet8das0lq77c0hjjthlbmicvued7s733uhj7jmeao4is1mu380u98qlf1iosf15b8atsfl1mo4bv3kl3i7hdo" ,
9
+ "summary" : {
10
+ "contents" : [
11
+ {
12
+ "annotation" : {
13
+ "tag" : " Var"
14
+ },
15
+ "segment" : " a"
16
+ },
17
+ {
18
+ "annotation" : null ,
19
+ "segment" : " "
20
+ },
21
+ {
22
+ "annotation" : {
23
+ "tag" : " TypeOperator"
24
+ },
25
+ "segment" : " ->"
26
+ },
27
+ {
28
+ "annotation" : null ,
29
+ "segment" : " "
30
+ },
31
+ {
32
+ "annotation" : {
33
+ "tag" : " Var"
34
+ },
35
+ "segment" : " b"
36
+ },
37
+ {
38
+ "annotation" : null ,
39
+ "segment" : " "
40
+ },
41
+ {
42
+ "annotation" : {
43
+ "tag" : " TypeOperator"
44
+ },
45
+ "segment" : " ->"
46
+ },
47
+ {
48
+ "annotation" : null ,
49
+ "segment" : " "
50
+ },
51
+ {
52
+ "annotation" : {
53
+ "tag" : " Var"
54
+ },
55
+ "segment" : " a"
56
+ }
57
+ ],
58
+ "tag" : " UserObject"
59
+ },
60
+ "tag" : " Plain"
61
+ },
62
+ "fqn" : " function.const" ,
63
+ "kind" : " term" ,
64
+ "projectRef" : " @transcripts/search"
65
+ }
66
+ ]
67
+ },
68
+ "status" : [
69
+ {
70
+ "status_code" : 200
71
+ }
72
+ ]
73
+ }
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ fetch "$transcript_user" GET 'type-var-search' '/search-definitions?query=b%20-%
58
58
# Fuzzy search, should find 'Text' and 'Nat.toText' and 'Nat.fromText'
59
59
fetch " $transcript_user " GET ' defn-search-fuzzy' ' /search-definitions?query=Text'
60
60
61
+ # Hash search
62
+ fetch " $transcript_user " GET ' defn-search-hash' ' /search-definitions?query=%2320991ok5ht'
63
+
61
64
# (a -> b) -> List a -> List b
62
65
fetch " $transcript_user " GET ' complex-type-mention-search' ' /search-definitions?query=(a%20-%3E%20b)%20-%3E%20List%20a%20-%3E%20List%20b'
63
66
You can’t perform that action at this time.
0 commit comments