Свойство | Тип | Описание | |
---|---|---|---|
$dataDir | The directory where all the data and metadata files are stored | ||
$invertedIndex | |||
$isDirty | tracks if the index or metadata has been altered and requires persisting to the database | ||
$metadata | array |
Метод | Описание | |
---|---|---|
__construct ( $dataDir ) | ||
__destruct ( ) | ||
addDocument ( |
Added a document to the index, default overwrites the existing | |
getInvertedIndex ( ) : |
||
getIsDirty ( ) : boolean | returns if the index/metadata has been updated since loaded into memory | |
getMetadata ( ) : array | key value array, key is the document id | |
persist ( ) | Persists the data back into the data dir, if it has been changed | |
query ( string $queryStr ) : array | ||
removeDocument ( |
Removes the document from the index |
public addDocument ( |
||
$document |
public getInvertedIndex ( ) : |
||
Результат |
public getIsDirty ( ) : boolean | ||
Результат | boolean |
public getMetadata ( ) : array | ||
Результат | array |
public persist ( ) |
public removeDocument ( |
||
$document |
protected $dataDir |
protected InvertedIndex,TextAnalysis\Indexes $invertedIndex | ||
Результат |
protected $isDirty |