| Package | org.servebox.toolbox.search |
| Class | public class SearchTree |
See also
| Property | Defined by | ||
|---|---|---|---|
| OPERATOR_AND : Number = 0 [static]
| SearchTree | ||
| OPERATOR_OR : Number = 1 [static]
| SearchTree | ||
| Property | Defined by | ||
|---|---|---|---|
| logger : ILogger [static]
The class logger.
| SearchTree | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| SearchTree | ||
|
addObjectToIndex(obj:IBasicObject, properties:Array):void
Adds an object to the index.
| SearchTree | ||
|
clearIndex():void
Deletes the index.
| SearchTree | ||
|
getObjects(searchExpression:String, operator:Number = 0):Array
Performs a search and returns results as an Array.
| SearchTree | ||
|
index(objs:Array, properties:Array):void
Add objects to the index.
| SearchTree | ||
|
search(searchExpression:String, operator:Number = 0):DictionaryTable
Performs a search.
| SearchTree | ||
|
setWordsSeparators(seps:Array):void
Sets the characters used to identify words terminations during index.
| SearchTree | ||
| logger | property |
protected static var logger:ILoggerThe class logger.
| OPERATOR_AND | property |
public static var OPERATOR_AND:Number = 0
| OPERATOR_OR | property |
public static var OPERATOR_OR:Number = 1
| SearchTree | () | constructor |
public function SearchTree()Constructor.
| addObjectToIndex | () | method |
public function addObjectToIndex(obj:IBasicObject, properties:Array):voidAdds an object to the index. The object to index should implement the IBasicObject interface.
Parametersobj:IBasicObject — The object to add.
|
|
properties:Array — An array containing the names of the properties to index (SearchProperty).
|
See also
| clearIndex | () | method |
public function clearIndex():voidDeletes the index.
| getObjects | () | method |
public function getObjects(searchExpression:String, operator:Number = 0):ArrayPerforms a search and returns results as an Array.
ParameterssearchExpression:String — The expression to search for.
|
|
operator:Number (default = 0) — The logical operator to use to combine results ({ |
Array — An Array containing results.
|
| index | () | method |
public function index(objs:Array, properties:Array):voidAdd objects to the index. The objects to index should implement the IBasicObject interface.
Parametersobjs:Array — The objects to add.
|
|
properties:Array — An array containing the names of the properties to index (SearchProperty).
|
See also
| search | () | method |
public function search(searchExpression:String, operator:Number = 0):DictionaryTablePerforms a search.
ParameterssearchExpression:String — The expression to search for.
|
|
operator:Number (default = 0) — The logical operator to use to combine results ({ |
DictionaryTable —
A DictionaryTable containing results. Keys are objects hash codes.
|
| setWordsSeparators | () | method |
public function setWordsSeparators(seps:Array):voidSets the characters used to identify words terminations during index.
Parametersseps:Array |