dartora

SearchItem

SearchItem is a simple container class used by Search to pair a Searchable item with its comparison result. It is defined in src/search/searcher.dart as:

class SearchItem {
  String? titleChan;
  final Searchable item;
  final SearchQueryComparison comparison;
  SearchItem({ required this.item, required this.comparison });
}

Fields

Use

The search() method of Search returns a list of SearchItems sorted by descending score. You can inspect the comparison.points.total to see the aggregate score, or look at comparison.hasRequired and comparison.containsNotAllowed to diagnose why an item passed or failed validity.

SearchItem is primarily a data holder; it does not implement comparison or other behaviours itself.