OJS/Lucene/Solr and other site

Hello,

I use Lucene with my OJS which utilizes Solr. I installed Solr according to the plugin documentation so it resides in the plugin directory. Now I have other site (not OJS) for which I wanted to use Solr. I was wondering if I could use the already installed Solr? The other site requires replacing the Solr default schema.xml and I am not sure how it could influence the OJS. This file was not replaced (at least manually) when configuring Lucene. Anyone has experience with that and could share it?

Thanks,

I’d like to get back to this question. If, on the same server, I want to use another webapp that utilizes solr (not OJS), as I understand Lucene documentation, should I use central server mode for solr?

Hi @piotreba

Hmmm… I have no experience with Solr except for OJS and in “embedded server mode”, but I think you could also use the same Solr installation for another application if that application is on the same server as OJS. The “embedded server mode” means that everything is provided to easily run and use Solr within OJS – the Solr is running locally (localhost) and knowing that all parameters, configurations, scripts are prepared and ready to securely run and work with OJS. Thus, this is similar to having the Solr installed anywhere on the same server/machine i.e. running locally – just that the OJS plugin provides everything needed for the installation and configuration, so that it can easily be run and used with OJS. Thus I believe you could change it so that it also works with your other application. It would be the same as installing the Solr on the same machine and configuring it to work for both. As far as I understand it, you would above all need to configure multiple cores in Solr. For OJS you could reuse the current configurations provided in the lucene plugin. Thereby you would need to consider if the other application is independent or if it should use the OJS search results.
On one hand the “remote server mode” would mean that Solr is on another machine (and thus also some other security and configurations/parameters have to be considered). On the other hand, in the OJS Solr concept documentation and README, this mode is considered if there should be an opportunity to search across several OJS installations and if other applications should use the OJS search content/results. See this part of the OJS Solr concept: https://pkp.sfu.ca/wiki/index.php?title=OJSdeSearchConcept#Index_Architecture

So as far as I understand you would definitely need to set multiple cores. Then it depends if the OJS search results should be available in that other application or not. Depending on the changes you would need to make in the current OJS plugin configurations files, you might consider having another and newer Solr installation on the same server, used only for that other application.

Hope that helps somehow…
Best,
Bozana

Thanks @bozana, yes, I am familiar with the README file of the Lucene plugin.

I set up Solr in central mode. I need fresh version of Solr (7.0) and apparently Lucene plugin for OJS does not support it. As I would like to use Solr for other apps, central mode seems to be reasonable as it allows to manage apps and corresponding Solr cores more effectively. I managed to adjust the other apps to the Solr 7, but not OJS.

Anyone succeeded to configure OJS with Solr in so-called central mode? Additionally, with newer Solr versions? Is Lucene plugin planned to be developed at all and be compatible with the latest Solr? I don’t find this plugin in the latest OJS (3.0.2)

Hi @piotreba

I know that OJS-de.net project is working on the new Solr version and its integration with OJS 3. Maybe @lilients can say more about that…

Best,
Bozana

And what limitations has standard OJS search?

@bozana, thanks, good to know. Waiting for further news then.

@Vitaliy, Solr is a robust search tool. Using it gives way better searching experience compared to the standard mysql-based searching. For me it is especially crucial in the case of scientific output, when you provide thousands articles.

s. also [OJS] Upgrade Lucene Plugin · Issue #2575 · pkp/pkp-lib · GitHub :slight_smile:

1 Like

@piotreba, a pretty old thread but thought I would add to the discussion.

You can run multiple indexes on a single Solr server. You’ll want to create a Solr core per index, so, for example, you might create an ojs core and a mywebapp core.

Creating new cores in Solr is pretty easy, check out the documentation at https://lucene.apache.org/solr/guide/7_3/solr-control-script-reference.html#create-a-core-or-collection.

Can you specify a schema to use or, better still, if the app is written to use the managed schema which does away with a hardcoded schema, allowing a lot more flexibility (and reducing the amount of configuration you have to implement). See https://lucene.apache.org/solr/guide/7_3/schemaless-mode.html#schemaless-mode.

Solr docs suggest using a schema for performance reasons but i disagree; I think the schemaless mode is really powerful and I haven’t experienced any negative effects from using it.

Hi @piotreba and @haydenyoung ,

As part of the optimization of external search support for OJS, the PKP Technical Committee is looking for use cases and relevant experience with the Lucene/Solr plugin for OJS.

GitHub - ojsde/lucene: Plugin for Solr/Lucene support in OJS. or via Plugin-Gallery

We are going to organize a meeting with all the interested parties. If you are interested in sharing requirements, user experiences and use cases, please feel free to contact me.

Regards,
Dulip Withanage