Skip to content

Instantly share code, notes, and snippets.

View thempatel's full-sized avatar

Milan Patel thempatel

View GitHub Profile
@thempatel
thempatel / normcore-llm.md
Created August 27, 2023 17:29 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
import (
"time"
"fs/queries”
"fs/reindexjobs"
"fs/search”
)
func document_processor(document *search.SearchDoc) error {
time_value, err := time.Parse(time.RFC8222, document.DateField)
import (
"time"
"fs/search”
)
// document_processor is applied to all documents returned by the database
func document_processor(document *search.SearchDoc) error {
time_value, err := time.Parse(time.RFC3339, document.DateField)
if err != nil {
import (
"fs/queries”
)
// Use this query to find the documents that we need to update
docs_to_update := queries.NewQuery(
queries.LastModified, // The field to query over
"*", // Everything into the past
"2020-10-13T15:00:00Z07:00" // Up until this afternoon
)