OJS 3.0.2 Journal Search function

Hi

We have just upgraded ti OJS 3.0.2. The ‘Search’ tool (on the front page) only searches for content in the ‘Current’ issue of the journal, rather than all issues.

Cheers
Rosarie

Hi @Rosarie_Coughlan,

I would suggest re-indexing your installation:

php tools/rebuildSearchIndex.php

…then flushing your data cache as Site Administrator. Then try searching again to see if that resolves the issue.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes

Hi @asmecher,

I’m the site admin for Rosarie, and I’ve done both of these things. This is the journal where we’re seeing the issue: http://ojs.library.queensu.ca/index.php/IEE.

I’ll try running the indexing again, but it appeared to have worked correctly.

Here’s our search config section - does anything in here look off to you?

``
[search]

; Minimum indexed word length
min_word_length = 3

; The maximum number of search results fetched per keyword. These results
; are fetched and merged to provide results for searches with several keywords.
results_per_keyword = 500

; The number of hours for which keyword search results are cached.
result_cache_hours = 1

; Paths to helper programs for indexing non-text files.
; Programs are assumed to output the converted text to stdout, and “%s” is
; replaced by the file argument.
; Note that using full paths to the binaries is recommended.
; Uncomment applicable lines to enable (at most one per file type).
; Additional “index[MIME_TYPE]” lines can be added for any mime type to be
; indexed.

; PDF
; index[application/pdf] = “/usr/bin/pstotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr ‘[:cntrl:]’ ’ '”
; index[application/pdf] = “/usr/bin/pdftotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr ‘[:cntrl:]’ ’ '”

; PostScript
; index[application/postscript] = “/usr/bin/pstotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr ‘[:cntrl:]’ ’ '”
; index[application/postscript] = “/usr/bin/ps2ascii %s | /usr/bin/tr ‘[:cntrl:]’ ’ '”

; Microsoft Word
; index[application/msword] = “/usr/bin/antiword %s”
; index[application/msword] = “/usr/bin/catdoc %s”
``

Hi @kaitlin,

That config looks fine to me (though it means full-text won’t be indexed, just metadata).

Regards,
Alec Smecher
Public Knowledge Project Team

If the full-text can be indexed and be searchable, that would be preferable?
Thanks
Rosarie

Hi @Rosarie_Coughlan,

For that, you’d need to configure one of the external tools in the quoted part of the configuration file so that OJS can use it to extract text from the full-text formats (typically PDF). HTML files are internally parsed and indexed, so no need to worry about them if you publish that way.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I wanted to follow up on this and let you know that this seemed to be caused by the coins plugin. Once i disabled it for this journal, the search worked as expected. I did rebuild the search index beforehand, but that didn’t resolve the issue.

This is the error message that tipped me off:

[Tue Jun 20 14:21:41.646625 2017] [:error] [pid 2657] [client 142.150.192.183:60027] PHP Fatal error:  Call to a member function getShowVolume() on null in /var/www/html/queens/plugins/generic/coins/CoinsPlugin.inc.php on line 77, referer: https://ojs.library.queensu.ca/index.php/IEE/search/search

Hi @kaitlin,

Ah, I see – I’ve diagnosed and fixed the problem:
https://github.com/pkp/pkp-lib/issues/2611

Applying either of the patches there (they are equivalent, just belonging to two different branches) should permit you to enable the COinS plugin without causing trouble with search results.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi
I have a OJS 3.0 installation and the search function never worked. I make a new installation of the OJS 3.0.2 Journal to try solve the problem but Search function also dont work and the COins plugin is not installed. By the way how can I re-indexing my installation at php tools/rebuildSearchIndex.php because I do not know how.
Thanks
Daniel

Hi @danioli,

If you have SSH access on your server, you can run the following command from your OJS directory to re-index your site: php tools/rebuildSearchIndex.php

After that, on your site, logged in as Administrator, go to Site Administration and Clear Data Caches.

Best,
Amanda Stevens
Public Knowledge Project Team

Hi Amanda

Thanks for the reply

When a PDF is uploaded directly to Issues/Future Issues, after publishing
the Issue, can the Published Date, Identification, Title and Desciption
data be searched from the search tool?

Best regards
Daniel

Hi Daniel,

All of the metadata you mentioned for published articles is searchable in the site search. Metadata for not-yet published articles is not searchable on the site-wide search because most users would not be able to access the articles yet. If you want to be able to search submissions that are not yet published by author or title, you can use the search tool in the top right of the submissions queue.

Best
Amanda Stevens
Public Knowledge Project Team