Improve documentation

* Update some parts regarding current state.

Relates: #176
This commit is contained in:
Daniel Siepmann 2019-06-06 17:17:45 +02:00
parent a13bb75e34
commit 839a9a954a
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
12 changed files with 46 additions and 64 deletions

View file

@ -59,5 +59,6 @@ t3tsref = https://docs.typo3.org/typo3cms/TyposcriptReference/
[extlinks] [extlinks]
issue = https://github.com/Codappix/search_core/issues/%s | GitHub issue: issue = https://github.com/Codappix/search_core/issues/%s | GitHub issue:
project = https://github.com/Codappix/search_core/projects/%s | Github project: project = https://github.com/Codappix/search_core/projects/%s | GitHub project:
pr = https://github.com/Codappix/search_core/pull/%s | Github pull request: pr = https://github.com/Codappix/search_core/pull/%s | GitHub pull request:
package = https://packagist.org/packages/%s | Composer package:

View file

@ -1,3 +1,5 @@
.. _change-feature-25:
Feature 25 "Respect multiple languages" - Provide sys_language_uid Feature 25 "Respect multiple languages" - Provide sys_language_uid
================================================================== ==================================================================

View file

@ -25,6 +25,8 @@ The structure is following TYPO3 Extbase conventions. All settings are placed in
Here is the example default configuration that's provided through static include: Here is the example default configuration that's provided through static include:
.. code-block:: typoscript .. code-block:: typoscript
:caption: Constants
:name: static-typoscript-constants
plugin { plugin {
tx_searchcore { tx_searchcore {
@ -53,6 +55,8 @@ Here is the example default configuration that's provided through static include
} }
.. code-block:: typoscript .. code-block:: typoscript
:caption: Setup
:name: static-typoscript-setup
plugin { plugin {
tx_searchcore { tx_searchcore {

View file

@ -123,32 +123,28 @@ E.g. you submit a filter in form of:
.. code-block:: html .. code-block:: html
<f:comment> <f:select name="searchRequest[filter][month][from]">
Due to TYPO3 7.x fluid limitations, we build this input ourself. <f:select.option value="">Month</f:select.option>
No longer necessary in 8 and above
</f:comment>
<select name="tx_searchcore_search[searchRequest][filter][month][from]" class="_control" >
<option value="">Month</option>
<f:for each="{searchResult.facets.month.options}" as="month"> <f:for each="{searchResult.facets.month.options}" as="month">
<f:if condition="{month.count}"> <f:if condition="{month.count}">
<option <f:select.option
value="{month.displayName -> f:format.date(format: 'Y-m')}" value="{month.displayName -> f:format.date(format: 'Y-m')}"
{f:if(condition: '{searchRequest.filter.month.from} == {month.displayName -> f:format.date(format: \'Y-m\')}', then: 'selected="true"')} selected="{f:if(condition: '{searchRequest.filter.month.from} == {month.displayName -> f:format.date(format: \'Y-m\')}', then: 1, else: 0)}"
>{month.displayName -> f:format.date(format: '%B %Y')}</option> >{month.displayName -> f:format.date(format: '%B %Y')}</f:select.option>
</f:if> </f:if>
</f:for> </f:for>
</select> </f:select>
<select name="tx_searchcore_search[searchRequest][filter][month][to]" class="_control" > <f:select name="searchRequest[filter][month][to]">
<option value="">Month</option> <f:select.option value="">Month</of:select.ption>
<f:for each="{searchResult.facets.month.options}" as="month"> <f:for each="{searchResult.facets.month.options}" as="month">
<f:if condition="{month.count}"> <f:if condition="{month.count}">
<option <f:select.option
value="{month.displayName -> f:format.date(format: 'Y-m')}" value="{month.displayName -> f:format.date(format: 'Y-m')}"
{f:if(condition: '{searchRequest.filter.month.from} == {month.displayName -> f:format.date(format: \'Y-m\')}', then: 'selected="true"')} selected="{f:if(condition: '{searchRequest.filter.month.from} == {month.displayName -> f:format.date(format: \'Y-m\')}', then: 1, else: 0)}"
>{month.displayName -> f:format.date(format: '%B %Y')}</option> >{month.displayName -> f:format.date(format: '%B %Y')}</f:select.option>
</f:if> </f:if>
</f:for> </f:for>
</select> </f:select>
This will create a ``month`` filter with sub properties. To make this filter actually work, you This will create a ``month`` filter with sub properties. To make this filter actually work, you
can add the following TypoScript, which will be added to the filter:: can add the following TypoScript, which will be added to the filter::

View file

@ -30,29 +30,20 @@ Then setup your system::
git clone git@github.com:codappix/search_core.git \ git clone git@github.com:codappix/search_core.git \
&& cd search_core \ && cd search_core \
&& export typo3DatabaseName="searchcoretest87" \ && export typo3DatabaseName="searchcoretest" \
&& export TYPO3_VERSION="~8.7" \
&& make install \ && make install \
&& make unitTests \ && make unitTests \
&& make functionalTests && make functionalTests \
&& make cgl
If all tests are okay, start your work. If all tests are okay, start your work.
If you are working with multiple TYPO3 versions make sure to export `typo3DatabaseName` and
`TYPO3_VERSION` in your environment like::
export typo3DatabaseName="searchcoretest76"
export TYPO3_VERSION="~7.6"
Also run the install command for each version before running any tests. Only this will make sure you
are testing against the actual TYPO3 Version and database scheme.
.. _contribution_development: .. _contribution_development:
Development Development
----------- -----------
All changes are introduced through pull requests at `Github`_ and should contain the following: All changes are introduced through pull requests at `GitHub`_ and should contain the following:
* Adjusted tests if tests existed before. Otherwise they will break on `travis-ci`_. * Adjusted tests if tests existed before. Otherwise they will break on `travis-ci`_.
@ -64,6 +55,6 @@ All changes are introduced through pull requests at `Github`_ and should contain
* Make sure to follow the documented :ref:`concepts`. * Make sure to follow the documented :ref:`concepts`.
.. _Github: https://github.com/codappix/search_core .. _GitHub: https://github.com/codappix/search_core
.. _travis-ci: https://travis-ci.org/ .. _travis-ci: https://travis-ci.org/
.. _PSR-2: http://www.php-fig.org/psr/psr-2/ .. _PSR-2: http://www.php-fig.org/psr/psr-2/

View file

@ -26,7 +26,7 @@ Searching
.. note:: .. note::
Currently only integrated for Elasticsearch with no abstraction. Currently only integrated for Elasticsearch with no abstraction.
If you need to implement your own search, please open an issue on Github and we will change the code If you need to implement your own search, please open an issue on GitHub and we will change the code
base. base.
Via TypoScript it's possible to configure the fields to query, minimum match and script fields. Via TypoScript it's possible to configure the fields to query, minimum match and script fields.
@ -54,8 +54,10 @@ Planned
The following features are currently planned and will be integrated: The following features are currently planned and will be integrated:
#. :issue:`25` Multi language. #. :issue:`25` Multi language.
Partially supported, see :ref:`change-feature-25`.
#. :issue:`94` Respect access rights while indexing relations. #. :issue:`94` Respect access rights while indexing relations.
#. :issue:`75` Configuration of index name (for Elasticsearch).
For a full list, check out our `open issues`_. For a full list, check out our `open issues`_.

View file

@ -8,10 +8,10 @@ Table of Contents
:glob: :glob:
features features
concepts
installation installation
configuration configuration
usage usage
concepts
connections connections
indexer indexer
dataprocessors dataprocessors

View file

@ -20,10 +20,6 @@ start indexing TYPO3.
Just add the indexer for a TYPO3 table. The indexer will use the TCA to fetch all necessary Just add the indexer for a TYPO3 table. The indexer will use the TCA to fetch all necessary
information like relations. information like relations.
.. note::
Not all relations are resolved yet, see :issue:`17`.
.. _PagesIndexer: .. _PagesIndexer:
PagesIndexer PagesIndexer
@ -34,7 +30,3 @@ start indexing TYPO3.
The indexer will use the TCA to fetch all necessary information like relations. Currently the The indexer will use the TCA to fetch all necessary information like relations. Currently the
implementation is very basic. implementation is very basic.
.. note::
Not all relations are resolved yet, see :issue:`17` and :pr:`20`.

View file

@ -9,16 +9,7 @@ Composer
The extension can be installed through composer:: The extension can be installed through composer::
composer require "codappix/search_core" "~0.0.7" composer require "codappix/search_core" "^1.0"
Note that you have to allow unstable packages:
.. code-block:: json
{
"minimum-stability": "dev",
"prefer-stable": true
}
Download Download
-------- --------
@ -26,11 +17,14 @@ Download
You can also `download`_ the extension and placing it inside the :file:`typo3conf/ext`-Folder of You can also `download`_ the extension and placing it inside the :file:`typo3conf/ext`-Folder of
your installation. In that case you need to install all dependencies yourself. Dependencies are: your installation. In that case you need to install all dependencies yourself. Dependencies are:
.. code:: PHP
Higher or equal then 7.2.0 and lower then 8
"php": ">=7.2.0 <8", TYPO3 CMS
"typo3/cms-core": "^9.5", Higher or equal then 9.5.0 and lower then 10.0.0
"ruflin/elastica": "^3.2"
Library https://elastica.io/
In version 3.2.x
Setup Setup
----- -----

View file

@ -18,7 +18,7 @@ re-indexing.
Current state Current state
------------- -------------
This is still a very early beta version. More information can be taken from Github at This is still a very early beta version. More information can be taken from GitHub at
`current issues`_. `current issues`_.
We are also focusing on Code Quality and Testing through `travis ci`_, ``phpcs``, ``phpunit`` and We are also focusing on Code Quality and Testing through `travis ci`_, ``phpcs``, ``phpunit`` and

View file

@ -11,8 +11,8 @@ Manual indexing
You can trigger indexing from CLI:: You can trigger indexing from CLI::
./typo3/cli_dispatch.phpsh extbase index:index --identifier 'pages' ./typo3/cli_dispatch.phpsh extbase index:index 'pages'
./bin/typo3cms index:index --identifier 'pages' ./bin/typo3cms index:index 'pages'
This will index the table ``pages`` using the :ref:`TcaIndexer`. This will index the table ``pages`` using the :ref:`TcaIndexer`.
@ -26,8 +26,8 @@ Manual deletion
You can trigger deletion for a single index from CLI:: You can trigger deletion for a single index from CLI::
./typo3/cli_dispatch.phpsh extbase index:delete --identifier 'pages' ./typo3/cli_dispatch.phpsh extbase index:delete 'pages'
./bin/typo3cms index:delete --identifier 'pages' ./bin/typo3cms index:delete 'pages'
This will delete the index for the table ``pages``. This will delete the index for the table ``pages``.