mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-16 11:05:59 +08:00
feat(map): ignoreIndex
This commit is contained in:
parent
22c7685239
commit
369a8f6050
@ -59,6 +59,7 @@ export async function getMapResults({
|
|||||||
mock,
|
mock,
|
||||||
filterByPath = true,
|
filterByPath = true,
|
||||||
flags,
|
flags,
|
||||||
|
ignoreIndex = false,
|
||||||
}: {
|
}: {
|
||||||
url: string;
|
url: string;
|
||||||
search?: string;
|
search?: string;
|
||||||
@ -74,6 +75,7 @@ export async function getMapResults({
|
|||||||
mock?: string;
|
mock?: string;
|
||||||
filterByPath?: boolean;
|
filterByPath?: boolean;
|
||||||
flags: TeamFlags;
|
flags: TeamFlags;
|
||||||
|
ignoreIndex?: boolean;
|
||||||
}): Promise<MapResult> {
|
}): Promise<MapResult> {
|
||||||
const id = uuidv4();
|
const id = uuidv4();
|
||||||
let links: string[] = [url];
|
let links: string[] = [url];
|
||||||
@ -170,7 +172,7 @@ export async function getMapResults({
|
|||||||
// Parallelize sitemap index query with search results
|
// Parallelize sitemap index query with search results
|
||||||
const [sitemapIndexResult, { data: indexResults, error: indexError }, ...searchResults] = await Promise.all([
|
const [sitemapIndexResult, { data: indexResults, error: indexError }, ...searchResults] = await Promise.all([
|
||||||
querySitemapIndex(url, abort),
|
querySitemapIndex(url, abort),
|
||||||
useIndex ? (
|
useIndex && !ignoreIndex ? (
|
||||||
index_supabase_service
|
index_supabase_service
|
||||||
.from("index")
|
.from("index")
|
||||||
.select("resolved_url")
|
.select("resolved_url")
|
||||||
@ -350,6 +352,7 @@ export async function mapController(
|
|||||||
mock: req.body.useMock,
|
mock: req.body.useMock,
|
||||||
filterByPath: req.body.filterByPath !== false,
|
filterByPath: req.body.filterByPath !== false,
|
||||||
flags: req.acuc?.flags ?? null,
|
flags: req.acuc?.flags ?? null,
|
||||||
|
ignoreIndex: req.body.ignoreIndex,
|
||||||
}),
|
}),
|
||||||
...(req.body.timeout !== undefined ? [
|
...(req.body.timeout !== undefined ? [
|
||||||
new Promise((resolve, reject) => setTimeout(() => {
|
new Promise((resolve, reject) => setTimeout(() => {
|
||||||
|
@ -658,6 +658,7 @@ export const mapRequestSchema = crawlerOptions
|
|||||||
timeout: z.number().positive().finite().optional(),
|
timeout: z.number().positive().finite().optional(),
|
||||||
useMock: z.string().optional(),
|
useMock: z.string().optional(),
|
||||||
filterByPath: z.boolean().default(true),
|
filterByPath: z.boolean().default(true),
|
||||||
|
ignoreIndex: z.boolean().default(false),
|
||||||
})
|
})
|
||||||
.strict(strictMessage);
|
.strict(strictMessage);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user