Lucene Plugin for OJS 3.3 - facets missing / restrict search to journal

Describe the issue or problem
I have downloaded the Lucene plugin (OJS 3.3.0 stable branch) from GitHub - pkp/lucene: Plugin for Solr/Lucene support in OJS. and installed it on our test server (embedded mode). It works. Good so, but …

But when I do a fairly generic search, I only ever see the “Publication Date” facet, even though I have activated all the other facets. At least the authors should also be facetted (even if there are only 14 hits).

If I look a bit more closely into the index (i.e. when I directly submit a facetBasedSuggest query with facet.field=authors_facet to the Solr server), I get author facets back.
So something seems to go wrong when facets are queried by the plugin.

Another problem is that in a multi-journal installation the search goes across all journals (see attached screenshot) - but I only want to find articles for the journal I am currently searching in. Is there any way to limit the search only to the specific journal? The Finnish journal platform (e.g. https://journal.fi/afs/ ) correctly limits to the specific journal only, but this one runs on OJS 3.2.

@asmecher - where can I start to debug what happens when the facets are queried or why the search is not limited to the journal Id of the current context?

What application are you using?
OJS 3.3.0-13

Additional information

lucene1
lucene2

1 Like

@ronste1 - is this known behaviour?

Hi @mpbraendle ,

I didn’t contribute to the upgrade of the plugin version for OJS 3.3 so I’m not up to date anymore with regard to the plugin code.

From my experience with prior versions missing facets usually originated in an incomplete lucene index. In particular with large multi journal installations indexing may take a long time.

But as you say you get facets back from a manual search this shouldn’t be the issue here.

Do you also get all facets back from a manual search when you don’t specify one specific facet like descibed here?

Otherwise I don#t have an idea what might be the issue.

@asmecher After long debugging, I have finallly found the bug. It’s the way how guzzleHttp deals with duplicate parameters (which are needed for facet querying in Solr/Lucene). After I have corrected this, now all facets are displayed and the search is restricted to the journal you are in.
I will send you updated code as soon as I have finished everything (probably in 2 weeks).

1 Like

@asmecher I have opened a pull request for the stable 3.3.0 branch. Please have a look at it. I have seen that main has been ported over to 3.4.0 - probably the same corrections may be valid too for this branch.

@asmecher - I had overcorrected a little bit - will send you a new pull request soon.

If somebody wants to try out: Lucene is now working on https://www.hope.uzh.ch/ (OJS-3.3.0-15) and its journals. We have disabled the “Similar articles” link for a while. It’s better to have it on the article details page than in the issue toc, were it is disturbing and sometimes gets in the way with the metadata (e.g. page range).

Also I’m thinking about how to display the facets when there is no sidebar.

Thanks, @mpbraendle! Make sure to tag me (@asmecher) on the PR when it’s ready for a look.