Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "time" | |
| "fs/queries” | |
| "fs/reindexjobs" | |
| "fs/search” | |
| ) | |
| func document_processor(document *search.SearchDoc) error { | |
| time_value, err := time.Parse(time.RFC8222, document.DateField) |