TntSearchFactory
class TntSearchFactory implements Factory (View source)
Creates a TNTSearch instance with appropriate configuration
If the config has no "driver" key, it is set to "filesystem". If the config has no "storage" key and the engine is SqliteEngine or a subclass of it, it is set to "userdocs-admin/indexes/". Relative storage paths are relative to the temporary folder.
In addition to the TNTSearch configuration, the config can have these keys:
- redis_dsn: A DSN for RedisEngine, in any format Symfony's RedisAdapter supports. When set, the redis_options key is used. The redis_scheme, redis_host, and redisport keys are set from the DSN if it is for a single Redis server over TCP or TLS, and removed if not. The other redis* keys are removed.
- mysql_dsn: A DSN for MysqlEngine in the format mysql://user:password@host:port/database. When set, it replaces the host and database keys, and the username and password keys if the DSN has them.
Constants
| private MYSQL_DSN_SCHEMES |
|
| private DEFAULT_STORAGE |
|
Methods
public
object|null
create(string $service, array $params = [])
Create a TNTSearch object with appropriate configuration
Details
object|null
create(string $service, array $params = [])
Create a TNTSearch object with appropriate configuration