[OJS 3.2.1.1] Search function does not work

Hi all,
I have the following setup:
OJS 3.2.1.1
Postgresql 12
Debian buster

The search function does not work.
I have tried to re-index search with:

    php tools/rebuildSearchIndex.php

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:

SELECT
o.submission_id
FROM
submission_search_objects o NATURAL JOIN submission_search_object_keywords o0 NATURAL JOIN submission_search_keyword_list k0
WHERE
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 [26529] ojs@ojs ERROR:  duplicate key value violates unique constraint "controlled_vocab_symbolic"
2021-01-21 11:29:37.871 CET [26529] ojs@ojs DETAIL:  Key (symbolic, assoc_type, assoc_id)=(submissionAgency, 1048588, 189) already exists.
2021-01-21 11:29:37.871 CET [26529] ojs@ojs STATEMENT:  INSERT INTO controlled_vocabs
					(symbolic, assoc_type, assoc_id)
					VALUES
                                        ( $1,  $2,  $3)

I do not know where to go from here.

Many thanks in advance!

Best regards
Marcus

We’re seeing similar errors. We had some issues which were fixed in OJS 3.2.1.2, but now we’re seeing many lines like:

PHP Notice:  Array to string conversion in /var/www/html/ojs/lib/pkp/classes/search/SubmissionSearchIndex.inc.php on line 37

and a few lines like:

I/O Error: Couldn't open file '/opt/ojs/files//journals/12//articles/6572/submission/proof/6572-121-9089-1-10-20200901.pdf': No such file or directory.

All those lines are proofs and the PDFs may have been deleted.

When upgrading to OJS 3.2.1.1, we saw keyword errors as described in [Upgrade 3.0.2.0 -> 3.2.1-1 keywords being lost in upgrade].

Hi all,
I still have this problem that the search function does not work.
Do anybody have any ideas or tip on how to proceed?

Many thanks in advance!

Hi all,

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.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you for the help Alec!!
That did it!
Now the search function seems to work fine!!

Regards
Marcus

1 Like