2016-12-15 17:59:13 +01:00
|
|
|
.. highlight:: typoscript
|
|
|
|
|
|
|
|
.. _configuration:
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
=============
|
|
|
|
|
|
|
|
The extension offers the following configuration options through TypoScript. If you overwrite them
|
|
|
|
through `setup` make sure to keep them in the `module` area as they will be accessed from backend
|
|
|
|
mode of TYPO3. Do so by placing the following line at the end::
|
|
|
|
|
|
|
|
module.tx_searchcore < plugin.tx_searchcore
|
|
|
|
|
|
|
|
.. todo::
|
|
|
|
|
|
|
|
We will use references inside the extension to make the above unnecessary in the future.
|
|
|
|
|
2016-12-16 12:55:23 +01:00
|
|
|
The structure is following TYPO3 Extbase conventions. All settings are placed inside of::
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
plugin.tx_searchcore.settings
|
|
|
|
|
2017-01-26 14:37:17 +01:00
|
|
|
Here is the example default configuration that's provided through static include:
|
|
|
|
|
|
|
|
.. literalinclude:: ../../Configuration/TypoScript/constants.txt
|
|
|
|
:language: typoscript
|
|
|
|
:linenos:
|
|
|
|
:caption: Static TypoScript Constants
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
.. literalinclude:: ../../Configuration/TypoScript/setup.txt
|
|
|
|
:language: typoscript
|
|
|
|
:linenos:
|
|
|
|
:caption: Static TypoScript Setup
|
|
|
|
|
|
|
|
.. _configuration_options:
|
|
|
|
|
|
|
|
Options
|
|
|
|
-------
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
The following section contains the different options, e.g. for :ref:`connections` and
|
|
|
|
:ref:`indexer`: ``plugin.tx_searchcore.settings.connection`` or
|
|
|
|
``plugin.tx_searchcore.settings.index``.
|
2016-12-16 12:55:23 +01:00
|
|
|
|
2016-12-15 17:59:13 +01:00
|
|
|
.. _configuration_options_connection:
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
connections
|
|
|
|
^^^^^^^^^^^
|
2016-12-15 17:59:13 +01:00
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
Holds settings regarding the different possible connections for search services like Elasticsearch
|
|
|
|
or Solr.
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
Configured as::
|
|
|
|
|
|
|
|
plugin {
|
|
|
|
tx_searchcore {
|
|
|
|
settings {
|
2016-12-20 10:04:44 +01:00
|
|
|
connections {
|
|
|
|
connectionName {
|
|
|
|
// the settings
|
|
|
|
}
|
2016-12-15 17:59:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
Where ``connectionName`` is one of the available :ref:`connections`.
|
|
|
|
|
|
|
|
The following settings are available. For each setting its documented which connection consumes it.
|
|
|
|
|
2016-12-15 17:59:13 +01:00
|
|
|
.. _host:
|
|
|
|
|
|
|
|
``host``
|
|
|
|
""""""""
|
|
|
|
|
|
|
|
Used by: :ref:`Elasticsearch`.
|
|
|
|
|
2016-12-16 12:55:23 +01:00
|
|
|
The host, e.g. ``localhost`` or an IP where the search service is reachable from TYPO3
|
2016-12-15 17:59:13 +01:00
|
|
|
installation.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
plugin.tx_searchcore.settings.connections.elasticsearch.host = localhost
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
.. _port:
|
|
|
|
|
|
|
|
``port``
|
|
|
|
""""""""
|
|
|
|
|
|
|
|
Used by: :ref:`Elasticsearch`.
|
|
|
|
|
2016-12-16 12:55:23 +01:00
|
|
|
The port where search service is reachable. E.g. default ``9200`` for Elasticsearch.
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
plugin.tx_searchcore.settings.connections.elasticsearch.port = 9200
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
.. _configuration_options_index:
|
|
|
|
|
|
|
|
index
|
|
|
|
^^^^^
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
Holds settings regarding the indexing, e.g. of TYPO3 records, to search services.
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
Configured as::
|
|
|
|
|
|
|
|
plugin {
|
|
|
|
tx_searchcore {
|
|
|
|
settings {
|
2016-12-20 10:04:44 +01:00
|
|
|
indexer {
|
|
|
|
indexerName {
|
|
|
|
// the settings
|
|
|
|
}
|
2016-12-15 17:59:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
Where ``indexerName`` is one of the available :ref:`indexer`.
|
|
|
|
|
|
|
|
The following settings are available. For each setting its documented which indexer consumes it.
|
|
|
|
|
2016-12-15 17:59:13 +01:00
|
|
|
.. _allowedTables:
|
|
|
|
|
|
|
|
``allowedTables``
|
|
|
|
"""""""""""""""""
|
|
|
|
|
|
|
|
Used by: :ref:`TcaIndexer`.
|
|
|
|
|
2016-12-16 12:55:23 +01:00
|
|
|
Defines which TYPO3 tables are allowed to be indexed. Only white listed tables will be processed
|
2016-12-15 17:59:13 +01:00
|
|
|
through Command Line Interface and Hooks.
|
|
|
|
|
|
|
|
Contains a comma separated list of table names. Spaces are trimmed.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
plugin.tx_searchcore.settings.indexer.tca.allowedTables = tt_content, fe_users
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
.. _rootLineBlacklist:
|
|
|
|
|
|
|
|
``rootLineBlacklist``
|
|
|
|
"""""""""""""""""""""
|
|
|
|
|
|
|
|
Used by: :ref:`TcaIndexer`.
|
|
|
|
|
|
|
|
Defines a blacklist of page uids. Records below any of these pages, or subpages, are not
|
|
|
|
indexed. This allows you to define areas that should not be indexed.
|
|
|
|
The page attribute *No Search* is also taken into account to prevent indexing records from only one
|
|
|
|
page without recursion.
|
|
|
|
|
2017-01-26 14:37:17 +01:00
|
|
|
Contains a comma separated list of page uids. Spaces are trimmed.
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
plugin.tx_searchcore.settings.index.tca.rootLineBlacklist = 3, 10, 100
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
Also it's possible to define some behaviour for the different document types. In context of TYPO3
|
|
|
|
tables are used as document types 1:1. It's possible to configure different tables. The following
|
|
|
|
options are available:
|
|
|
|
|
|
|
|
.. _additionalWhereClause:
|
|
|
|
|
|
|
|
``additionalWhereClause``
|
|
|
|
"""""""""""""""""""""""""
|
|
|
|
|
|
|
|
Used by: :ref:`TcaIndexer`.
|
|
|
|
|
|
|
|
Add additional SQL to where clauses to determine indexable records from the table. This way you
|
|
|
|
can exclude specific records like ``tt_content`` records with specific ``CType`` values or
|
|
|
|
something else. E.g. you can add a new field to the table to exclude records from indexing.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2016-12-20 10:04:44 +01:00
|
|
|
plugin.tx_searchcore.settings.index.tca.tt_content.additionalWhereClause = tt_content.CType NOT IN ('gridelements_pi1', 'list', 'div', 'menu')
|
2016-12-15 17:59:13 +01:00
|
|
|
|
|
|
|
.. attention::
|
|
|
|
|
|
|
|
Make sure to prefix all fields with the corresponding table name. The selection from
|
|
|
|
database will contain joins and can lead to SQL errors if a field exists in multiple tables.
|