Full text search (any search) in REST API?

Describe the issue or problem
I’ve got request that results from our journal should be included into global results from search box on our institution main page.

I am looking for search functionality in API documentation and the closest match to search I see searchPhrase in Submissions section.

GET /submissions?searchPhrase={artist]

but it will look only in titles and authors list. It won’t work for full text search. Full text search works without problems on page.

What application are you using?
OJS 3.4.0-5

Hi @Mikolaj,

The search phrase in the submission API endpoint doesn’t include full-text searching. If you’re looking to work with full-text search, there currently isn’t any API exposure for that – but you might consider working with Lucene and the Lucene plugin, which would give you much better access to search tools. We’re also working right now on a cleanup and rewrite of the search layer to use Laravel Scout as an intermediary; that still wouldn’t give you API-based access to the built in search engine, but would make working with search tools (both built-in internal and external) much easier. See Improve search framework · Issue #8920 · pkp/pkp-lib · GitHub for growing details on that.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Does your institution provide a meta search? Otherwise, recommend them to crawl the journal and index its content in their search engine.

The Lucene option recommended by Alec is worth considering - it runs with multi-language indexing, query autosuggestion, facets, hit-highlighting of fulltext snippets and works fast with a large publication corpus. If you want to see it in action, you may check https://www.chimia.ch/chimia/search . Installation, however is not straight-forward and you should follow the README in the plugin thoroughly.

1 Like

This topic was automatically closed after 9 days. New replies are no longer allowed.