You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b9fdc24
Browse filesBrowse the repository at this point in the historyBrowse files
stlc-bot
committed
feat(news): add natural-language search to POST /news/search (#1975)
Usage: "Find company news by name, domain, ticker, or ISIN. Filter articles and continue\nthrough results with a cursor.",
19
+
Usage: "Find news about a company by name, domain, ticker, or ISIN, or search all news\nwith a natural-language query. Filter articles and continue through results with\na cursor.",
20
20
Suggest: true,
21
21
Flags: []cli.Flag{
22
22
&requestflag.Flag[map[string]any]{
23
23
Name: "search-by",
24
-
Usage: "What to search for.",
24
+
Usage: "What to search for: a specific company, or a natural-language query across all news.",
25
25
Required: true,
26
26
BodyPath: "searchBy",
27
27
},
@@ -43,8 +43,7 @@ var newsSearch = requestflag.WithInnerFlags(cli.Command{
43
43
},
44
44
&requestflag.Flag[map[string]any]{
45
45
Name: "sort-by",
46
-
Usage: "Result ordering. Defaults to newest.",
47
-
Default: map[string]any{"type": "newest"},
46
+
Usage: "Result ordering. Defaults to newest for entity searches. Natural-language searches are always ordered by relevance.",
48
47
BodyPath: "sortBy",
49
48
},
50
49
&requestflag.Flag[[]string]{
@@ -56,18 +55,6 @@ var newsSearch = requestflag.WithInnerFlags(cli.Command{
56
55
Action: handleNewsSearch,
57
56
HideHelpCommand: true,
58
57
}, map[string][]requestflag.HasOuterFlag{
59
-
"search-by": {
60
-
&requestflag.InnerFlag[map[string]any]{
61
-
Name: "search-by.entity",
62
-
Usage: "The company to search news for, identified by name, domain, ticker, or ISIN.",
63
-
InnerField: "entity",
64
-
},
65
-
&requestflag.InnerFlag[string]{
66
-
Name: "search-by.type",
67
-
Usage: "How to search. Only entity search is supported.",
0 commit comments