Bug #84919
openIndexed-Search - Configuration
0%
Description
I'm not sure whether this is a mere Documentation issue, or really a bug. Clearly, the documentation for the latest indexedsearch version is wrong.
The docs state:
search.rootPidList should be set to the required pageID to only show the results of a subset of the Website tree.
This is wrong.
a) it's not search.rootPidList but settings.rootPidList
b) When this is set to a number higher than 1 in the TS-config, the plugin always returns 0 results.
This is because the value is compared to index_section.rl0. But the value of this table-field is always 1, i.e. the root page of the website.
So setting the config-value to something greater than 1 never returns true in the query.
The function sectionTableWhere() on Row 788 of the file indexed_search/Domain/IndexSearchRepository.php creates the query and if the class variable SearchRootPageIdList is 0 or bigger, it sets a WHERE-clause of ISEC.rl0 to compare to the value of settings.rootPidList (row 796).
But, as mentioned before, this will never return a positive result. I don't know whether this is intentional or a bug.
To achieve the required result (i.e. searching only a subpart of the website tree), the correct setting in the TS is:
plugin.tx_indexedsearch.settings.defaultOptions.sections = rl1_xxx (where xxx is the id of the required top page to be searched).
So, if it's a bug, it should be fixed. If it's just me misinterpreting the docs, at least the docs should be updated with the correct information, like mentioned above. In any case, it's misleading and I found quite a lot people on the web with the same problem (their solution never worked for the current version of indexedsearch, though, so I had to dig through the code to find the correct way for myself).