- SearchFactory
SearchFactory Class
- SearchInterpreter
- SearchInterpreter
- SearchNormalizer
- SearchParser
- SearchParser
- SearchTokenizer
- SearchTokenizer
- Search
- Search
SearchFactory Class
Kind: global class
Param | Type | Description |
---|---|---|
registry | Object |
The registry for storing class references |
searchFactory.createTokenizer() ⇒ SearchTokenizer
Creates an instance of the SearchTokenizer class
Kind: instance method of SearchFactory
Returns: SearchTokenizer
- - Instance of SearchTokenizer
searchFactory.createParser() ⇒ SearchParser
Creates an instance of the SearchParser class
Kind: instance method of SearchFactory
Returns: SearchParser
- - Instance of SearchParser
searchFactory.createInterpreter() ⇒ SearchInterpreter
Creates an instance of the SearchInterpreter class
Kind: instance method of SearchFactory
Returns: SearchInterpreter
- - Instance of SearchInterpreter
Kind: global class
Param | Type | Description |
---|---|---|
ast | Object |
The AST to interpret |
Interprets the AST against a given text
Kind: instance method of SearchInterpreter
Param | Type | Description |
---|---|---|
text | string |
Text to search |
Kind: global class
Param | Type | Description |
---|---|---|
ast | Object |
The AST to interpret |
Interprets the AST against a given text
Kind: instance method of SearchInterpreter
Param | Type | Description |
---|---|---|
text | string |
Text to search |
Normalizes a text string
Kind: static method of SearchNormalizer
Param | Type | Description |
---|---|---|
text | string |
Text to normalize |
Kind: global class
- SearchParser
- new SearchParser(tokens)
- .parse() ⇒
Object
Param | Type | Description |
---|---|---|
tokens | Array |
Tokens to parse |
Initiates the parsing process
Kind: instance method of SearchParser
Returns: Object
- - AST
Kind: global class
- SearchParser
- new SearchParser(tokens)
- .parse() ⇒
Object
Param | Type | Description |
---|---|---|
tokens | Array |
Tokens to parse |
Initiates the parsing process
Kind: instance method of SearchParser
Returns: Object
- - AST
Tokenizes a query string
Kind: instance method of SearchTokenizer
Returns: Array
- - List of tokens
Param | Type | Description |
---|---|---|
query | string |
Query to tokenize |
Tokenizes a query string
Kind: instance method of SearchTokenizer
Returns: Array
- - List of tokens
Param | Type | Description |
---|---|---|
query | string |
Query to tokenize |
Kind: global class
- Search
- new Search(opts)
- .evaluator(needle) ⇒
function
- .evaluate(needle, haystack) ⇒
boolean
Param | Type | Description |
---|---|---|
opts | Object |
Options for Search |
Creates an evaluator function based on the needle (query string)
Kind: instance method of Search
Returns: function
- - Evaluator function
Param | Type | Description |
---|---|---|
needle | string |
Query string |
Evaluates a query string against a text string
Kind: instance method of Search
Returns: boolean
- - True if the query matches, false otherwise
Param | Type | Description |
---|---|---|
needle | string |
Query string |
haystack | string |
Text string |
Kind: global class
- Search
- new Search(opts)
- .evaluator(needle) ⇒
function
- .evaluate(needle, haystack) ⇒
boolean
Param | Type | Description |
---|---|---|
opts | Object |
Options for Search |
Creates an evaluator function based on the needle (query string)
Kind: instance method of Search
Returns: function
- - Evaluator function
Param | Type | Description |
---|---|---|
needle | string |
Query string |
Evaluates a query string against a text string
Kind: instance method of Search
Returns: boolean
- - True if the query matches, false otherwise
Param | Type | Description |
---|---|---|
needle | string |
Query string |
haystack | string |
Text string |