You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/search_implementation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,18 +53,18 @@ It parses each raw HED string into a lightweight {class}`~hed.models.string_sear
53
53
Key characteristics:
54
54
55
55
- Input is a raw string (or a `pd.Series` via {func}`~hed.models.string_search.search_series`).
56
-
- Schema is **optional**: pass a `schema_lookup` dict (see {mod}`hed.models.schema_lookup`) to enable ancestor matching for long-form strings; omit it for purely literal matching.
56
+
- Schema is **optional**: pass a `schema_lookup` dict (see {mod}`hed.models.schema_lookup`) to enable ancestor matching for short-form strings (e.g. `Event` matching `Sensory-event`); omit it for purely literal matching.
57
57
- Output is a list (truthy/falsy) — row-filtering only, no object references.
58
58
- Supports the same full query syntax as `QueryHandler` (`&&`, `||`, `~`, `@`, `{}`, etc.).
59
59
-`@A` carries the same semantics as `QueryHandler` — A must **not** be present.
60
-
-Without a schema lookup, `Event` does **not** match `Sensory-event` (short-form strings). With a schema lookup, ancestor matching works for long-form strings (`Event/Sensory-event`).
60
+
-Long-form strings (`Event/Sensory-event`) support ancestor matching via slash-splitting even without a lookup. Short-form strings (`Sensory-event`) require a `schema_lookup` for ancestor matching; without one, matching is purely literal.
61
61
- Parse cost is a lightweight recursive split — much cheaper than a full HedString + schema parse.
62
62
63
63
Use `StringQueryHandler` when you have raw strings (not `HedString` objects), need the full `QueryHandler` query syntax, and either don't have a schema available or want faster processing at the cost of losing full schema-aware ancestor matching. See {class}`hed.models.string_search.StringQueryHandler`.
64
64
65
65
### Generating a schema lookup
66
66
67
-
If you want `StringQueryHandler` to resolve ancestors for long-form strings without a full schema parse per row, you can pre-generate a lookup dictionary from a `HedSchema`:
67
+
If you want `StringQueryHandler` to resolve ancestors for short-form strings (e.g. query `Event` matching `Sensory-event`) without a full schema parse per row, you can pre-generate a lookup dictionary from a `HedSchema`:
0 commit comments