@social-data/social-neuron-subscription 1.0.0-beta.21 → 1.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@social-data/social-neuron-subscription",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.22",
|
|
4
4
|
"description": "Social Neuron subscription 能力 CLI —— 一能力一命令(social-neuron-subscription),薄客户端直达 /subscription/{op}。",
|
|
5
5
|
"bin": {
|
|
6
6
|
"social-neuron-subscription": "bin/cli.js"
|
|
@@ -138,13 +138,13 @@ social-neuron-subscription get-field-values --field kw_tag_brand --keyword 兰
|
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
# 近 7 天抖音命中该规则的数据里,按点赞数取最高的 1000 条
|
|
141
|
-
social-neuron-subscription job-create --name 抖音高互动采样 --rule-ids '["12345"]' --source '["抖音"]' --published 'T-7~T-1' --top '[{"field":"
|
|
141
|
+
social-neuron-subscription job-create --name 抖音高互动采样 --rule-ids '["12345"]' --source '["抖音"]' --published 'T-7~T-1' --top '[{"field":"long_likeCount","order":"desc"}]' --size 1000 --frequency '每天早上8点' -y
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
`--top` 是 JSON 数组,多个字段按顺序作排序优先级(前者相同时比后者):
|
|
145
145
|
|
|
146
146
|
```bash
|
|
147
|
-
--top '[{"field":"
|
|
147
|
+
--top '[{"field":"long_likeCount","order":"desc"},{"field":"date_publishedAt","order":"desc"}]'
|
|
148
148
|
# 先按点赞降序;点赞一样多的,新的排前面
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -152,6 +152,12 @@ social-neuron-subscription job-create --name 抖音高互动采样 --rule-ids
|
|
|
152
152
|
`keyword` / `long` / `double` / `date` 的字段。`text`(正文这类分词字段)、`boolean`、
|
|
153
153
|
`object`、`nested` 建 job 时直接拒。`order` 省略默认 `desc`。
|
|
154
154
|
|
|
155
|
+
**字段名必须现查**(`list-fields --source '[...]' --keyword 赞`)—— 各站点字段不同,
|
|
156
|
+
上面示例里的 `long_likeCount` 是小红书实查到的点赞数字段,别凭印象写 `kw_likeCount`
|
|
157
|
+
这类名字,那会在建 job 时报"字段不存在"。
|
|
158
|
+
|
|
159
|
+
**导出文件按排序顺序输出**:第一行即第 1 名。
|
|
160
|
+
|
|
155
161
|
想改回取全部:`job-update --top '[]'`。
|
|
156
162
|
|
|
157
163
|
**为什么取前 N 条的 size 反而小这么多**:它要让搜索引擎在全部索引上做一次全局排序,
|
|
@@ -242,7 +248,7 @@ social-neuron-subscription get-field-values --field kw_tag_brand --keyword 兰
|
|
|
242
248
|
# 传了 --top 就从「给全部命中数据」改成「只给排序后的前 N 条」,筛选条件不变
|
|
243
249
|
social-neuron-subscription job-create --name 抖音高互动采样 \
|
|
244
250
|
--rule-ids '["12345"]' --source '["抖音"]' --published 'T-7~T-1' \
|
|
245
|
-
--top '[{"field":"
|
|
251
|
+
--top '[{"field":"long_likeCount","order":"desc"}]' --size 1000 \
|
|
246
252
|
--frequency '每天早上8点' -y
|
|
247
253
|
```
|
|
248
254
|
|