Class: Ferret::Search::WildcardQuery
- Inherits:
-
Object
- Object
- Ferret::Search::WildcardQuery
- Defined in:
- ext/r_search.c
Overview
Summary
WildcardQuery is a simple pattern matching query. There are two wild-card characters.
-
“*” which matches 0 or more characters
-
“?” which matches a single character
Example
query = WildcardQuery.new(:field, "h*og")
# matches => "hog"
# matches => "hot dog"
query = WildcardQuery.new(:field, "fe?t")
# matches => "feat"
# matches => "feet"
query = WildcardQuery.new(:field, "f?ll*")
# matches => "fill"
# matches => "falling"
# matches => "folly"