Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ted_at, updated_at
Add buildDateRangeQuery helper using MinRFC3339CompatibleTime/MaxRFC3339CompatibleTime as sentinels for unbounded ranges. Wire CreatedBy, UpdatedBy, CreatedAfter, CreatedBefore, UpdatedAfter, UpdatedBefore filters in buildQuery. Add five tests covering all new filter paths and field round-trip.
…ore, --updated-after/before flags Add six new filter flags wired through searchRunOptions and store.Search. Add normalizeDateBound helper to expand YYYY-MM-DD to RFC3339. Add shortDate helper for text output byline. Show author/date byline in text output when fields are present. Preserve new fields in standard result projection. Relax QUERY requirement when any filter flag is provided. Add CLI integration tests and unit tests for both helpers.
…t field mappings These were part of Task 4 but not staged in the earlier commit.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
created_by,created_at,updated_by,updated_atfrom YAML frontmatter to the search index (denormalized into every page/section/code document).conf searchflags:--created-by,--updated-by,--created-after,--created-before,--updated-after,--updated-before.Changes
internal/search/document.goCreatedBy,CreatedAt,UpdatedBy,UpdatedAttoDocumentstruct.CreatedBy,UpdatedBy,CreatedAfter,CreatedBefore,UpdatedAfter,UpdatedBeforetoSearchOptions.internal/search/indexer.goindexFile()for page, section, and code documents.normalizeDatehelper.SQLite backend (
internal/search/sqlitestore/)schema.go: Four new columns + two indexes.store.go: Updated INSERT, SELECT, Scan, and WHERE clauses; addedaddColumnsIfMissing()migration helper.TestStore_FilterByCreatedBy,TestStore_FilterByUpdatedBy,TestStore_FilterByCreatedAfterAndBefore,TestStore_FilterByUpdatedAfter,TestStore_AuthorFieldsRoundTrip.Bleve backend (
internal/search/blevestore/)mapping.go: Four new field mappings.store.go: UpdateddocToMap,mapToDoc,buildQuery; addedbuildDateRangeQueryhelper usingMinRFC3339CompatibleTime/MaxRFC3339CompatibleTimesentinels.TestBleve_FilterByCreatedBy,TestBleve_FilterByUpdatedBy,TestBleve_FilterByCreatedAfterAndBefore,TestBleve_FilterByUpdatedAfter,TestBleve_AuthorFieldsRoundTrip.CLI (
cmd/search.go,cmd/search_test.go)searchRunOptions→store.Search.normalizeDateBoundhelper: expandsYYYY-MM-DDto RFC3339; passes through existing RFC3339 strings unchanged.shortDatehelper: trims RFC3339 toYYYY-MM-DDfor text output.Created by,Created,Updated by,Updatedwhen fields are present.projectResultstandard case now preserves the four new fields.TestSearch_CreatedByFlag,TestSearch_UpdatedByFlag,TestNormalizeDateBound_*,TestShortDate_*.Test Results
All tests pass:
go test ./...andgo build ./...succeed.