mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-10 14:48:13 -05:00
* remove algoliasearch and update search with weight (title=100, tags=50, tldr=25, content=10) * fix project search and update search with regex \bword\b or \bword * remove algolia dependencies from package.json, yarn.lock, etc. * Base search on fuse.js, implement same search in projects/ blog/ and navbar search * add research to navbar search, improve search functionality, update test.
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
import { NextResponse } from "next/server"
|
|
|
|
// These should be the same indexes used in the search route
|
|
// to ensure consistency
|
|
const allIndexes = ["blog", "projects", "research"]
|
|
|
|
export async function GET() {
|
|
try {
|
|
return NextResponse.json({
|
|
indexes: allIndexes,
|
|
status: "success",
|
|
})
|
|
} catch (error) {
|
|
console.error("Error fetching search indexes:", error)
|
|
return NextResponse.json(
|
|
{ error: "Failed to fetch search indexes" },
|
|
{ status: 500 }
|
|
)
|
|
}
|
|
}
|