gastownhall/beads · error

description only supports = operator (use desc contains patt

Error message

description only supports = operator (use desc contains pattern)

What it means

applyDescriptionFilter accepts only = on the description field. `description = none` (or empty/null) maps to filter.EmptyDescription, finding issues with no description; any other value maps to DescriptionContains (substring match). All other operators are rejected. The message hints that contains-style searches use the desc field in predicate mode.

Source

Thrown at internal/query/evaluator.go:314

	if comp.Value == "" || strings.ToLower(comp.Value) == "none" || strings.ToLower(comp.Value) == "null" {
		filter.NoLabels = true
	} else {
		filter.Labels = append(filter.Labels, comp.Value)
	}
	return nil
}

func (e *Evaluator) applyTitleFilter(comp *ComparisonNode, filter *types.IssueFilter) error {
	if comp.Op != OpEquals {
		return fmt.Errorf("title only supports = operator (use title contains pattern)")
	}
	filter.TitleContains = comp.Value
	return nil
}

func (e *Evaluator) applyDescriptionFilter(comp *ComparisonNode, filter *types.IssueFilter) error {
	if comp.Op != OpEquals {
		return fmt.Errorf("description only supports = operator (use desc contains pattern)")
	}
	if comp.Value == "" || strings.ToLower(comp.Value) == "none" || strings.ToLower(comp.Value) == "null" {
		filter.EmptyDescription = true
	} else {
		filter.DescriptionContains = comp.Value
	}
	return nil
}

func (e *Evaluator) applyNotesFilter(comp *ComparisonNode, filter *types.IssueFilter) error {
	if comp.Op != OpEquals {
		return fmt.Errorf("notes only supports = operator")
	}
	filter.NotesContains = comp.Value
	return nil
}

func (e *Evaluator) applyCreatedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {

View on GitHub (pinned to 71377f2769)

Solutions

  1. Use `description = <substring>` in filter mode (behaves as contains)
  2. Use `description = none` to find issues lacking a description
  3. Use the `desc` field with contains in predicate mode for richer matching

Example fix

// before
bd list 'description contains panic'
// after
bd list 'description = panic'
Defensive patterns

Strategy: validation

Validate before calling

// Validate description comparisons before evaluation
if comp.Field == "description" && comp.Op != OpEquals {
	return fmt.Errorf("use 'description = <substring>' or 'description = none'")
}

Type guard

func descOpSupported(op Op) bool { return op == OpEquals }

Try / catch

if err := eval.applyComparison(comp, filter); err != nil {
	if strings.Contains(err.Error(), "description only supports = operator") {
		// rewrite to description = <value> or desc contains in predicate mode
	}
}

Prevention

When it happens

Trigger: Queries like `description contains error`, `desc != foo`, or `description ~ x` produce a ComparisonNode with Op != OpEquals and fail in filter mode.

Common situations: Searching issue bodies with contains syntax; trying to find empty descriptions with `description = ""` (works) versus `description != ""` (fails); queries adapted from other trackers' full-text search.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/9c1b55cb6adaf58f. Report an issue: GitHub.