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