search

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package search provides full-text search across task titles and bodies.

Search is case-insensitive and returns results with match locations and contextual snippets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBodySnippet

func ExtractBodySnippet(body, lowerQuery string) string

ExtractBodySnippet returns a short snippet of body text around the first match.

Types

type Result

type Result struct {
	ID            string `json:"id" yaml:"id"`
	Title         string `json:"title" yaml:"title"`
	Status        string `json:"status" yaml:"status"`
	Priority      string `json:"priority" yaml:"priority"`
	FilePath      string `json:"file_path" yaml:"file_path"`
	MatchLocation string `json:"match_location" yaml:"match_location"`
	Snippet       string `json:"snippet" yaml:"snippet"`
}

Result represents a single search match.

func Search(tasks []*model.Task, query string) []Result

Search performs case-insensitive full-text search across task titles and bodies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL