mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-20 09:49:09 +08:00
fix: search return amount
This commit is contained in:
parent
1ca29b4b0e
commit
20a7d4d538
@ -147,7 +147,7 @@ export class SearcherHost extends RPCHost {
|
|||||||
const searchQuery = searchExplicitOperators.addTo(q || noSlashPath);
|
const searchQuery = searchExplicitOperators.addTo(q || noSlashPath);
|
||||||
const r = await this.cachedWebSearch({
|
const r = await this.cachedWebSearch({
|
||||||
q: searchQuery,
|
q: searchQuery,
|
||||||
num: count ? (isVersion2 ? count : Math.min(Math.floor(count + 2), 12)) : 12
|
num: count > 10 ? 20 : 10
|
||||||
}, crawlerOptions.noCache);
|
}, crawlerOptions.noCache);
|
||||||
|
|
||||||
if (!r.organic.length) {
|
if (!r.organic.length) {
|
||||||
@ -161,7 +161,7 @@ export class SearcherHost extends RPCHost {
|
|||||||
if (isVersion2) {
|
if (isVersion2) {
|
||||||
chargeAmount = 10000;
|
chargeAmount = 10000;
|
||||||
const result = [];
|
const result = [];
|
||||||
for (const x of r.organic) {
|
for (const x of r.organic.slice(0, count)) {
|
||||||
const url = new URL(x.link);
|
const url = new URL(x.link);
|
||||||
const favicon = await this.getFavicon(url.origin);
|
const favicon = await this.getFavicon(url.origin);
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit b5e688359eaa87538ef5f43c1323ab92eca8ea33
|
Subproject commit b37a272c11bffc6484715594f8f285ac50e461dd
|
||||||
Loading…
x
Reference in New Issue
Block a user