I have the following setup:
The search function does not work.
I have tried to re-index search with:
and cleared data cache.
The php message I get over and over again running re-indexing is:
PHP Notice: Array to string conversion in /var/www/html/ojs/lib/pkp/classes/search/SubmissionSearchIndex.inc.php on line 37
I have tried the SQL queries in post:
submission_search_objects o NATURAL JOIN submission_search_object_keywords o0 NATURAL JOIN submission_search_keyword_list k0
k0.keyword_text = 'interbull'
GROUP BY o.submission_id;
This returns 100 results and if I search on the first page of the home page I get 4 results.
Another search with an author name returns 5 results and on the homepage nothing.
So far all searches on the homepage returns nothing except for “interbull” which returns 4 results.
I did not mamage to get the other SQL query running, complaining about syntax error.
Looking in the logs, the only thing I find is in the postgres log.
The same error over and over again:
2021-01-21 11:29:37.871 CET  ojs@ojs ERROR: duplicate key value violates unique constraint "controlled_vocab_symbolic"
2021-01-21 11:29:37.871 CET  ojs@ojs DETAIL: Key (symbolic, assoc_type, assoc_id)=(submissionAgency, 1048588, 189) already exists.
2021-01-21 11:29:37.871 CET  ojs@ojs STATEMENT: INSERT INTO controlled_vocabs
(symbolic, assoc_type, assoc_id)
( $1, $2, $3)
Before debugging further, I’d recommend upgrading to the latest 3.2.1-x release; this will be database-compatible with your current 3.2.1-1 and 3.2.1-2 releases, so a very easy upgrade, but will include a number of small fixes, potentially including something that’ll help with the issue you’re having with search indexing. Then try rebuilding the search index using tools/rebuildSearchIndex.php and follow up here for next steps if the problem is still occurring.
Public Knowledge Project Team