Search First Cookbook
Build a complete search application with highlights, facets, and entity expansion.What You’ll Build
A search interface that:- Ingests documents
- Returns highlighted results
- Shows faceted filters
- Displays related entities
Prerequisites
- cogmem-kos installed and running
- Python 3.12+
httpxfor API calls
Step 1: Ingest Documents
First, let’s add some sample documents:Step 2: Wait for Processing
The worker needs to process the documents:Step 3: Search
Now search for content:Step 4: Display Facets
Show faceted filters:Step 5: Filter by Facet
Apply a facet filter:Step 6: Show Related Entities
Display entities mentioned in results:Complete Example
Next Steps
Entity Pages
Build entity detail views
Integrations
Connect to AI frameworks