- Home
- /
- DMBSearchBuilder
- /
- Getting Started
Getting Started — SearchBuilder
Build the search database during prebuilding.
1. Add SearchBuilder to the prebuild project
SearchBuilder belongs in the project that prepares website assets and databases before the website is launched.
dotnet add package DMBSearchBuilder2. Configure the website launch profile
The builder can start the website only when it is not already available. Keep UseNoBuild enabled when the website has already been built, or disable it when prebuilding must tolerate a missing output executable. It stops only the process it started.
await new SearchBuilderAgent().BuildFromLaunchProfileAsync(new SearchLaunchProfileBuildOptions
{
ProjectPath = websiteProjectPath,
LaunchSettingsPath = websiteLaunchSettingsPath,
LaunchProfileName = "NuGet https",
FallbackLaunchProfileName = "https",
DatabasePath = Path.Combine(websiteRoot, "Search", "data.db"),
MaxPages = 500,
PreserveQueryStrings = false,
UseNoBuild = false
});3. Regenerate after content changes
Re-run prebuilding whenever page content, navigation, documentation data or scoring rules change. SearchBuilder will rebuild Search/data.db with normalized and weighted search terms.
Key Options
Review the crawler architecture and scoring storage
Understand how SearchBuilder separates the crawler, normalizer and database writer.
Architecture