Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query string to Solr with array values #21

Open
mathiasv27 opened this issue May 23, 2023 · 1 comment
Open

Query string to Solr with array values #21

mathiasv27 opened this issue May 23, 2023 · 1 comment

Comments

@mathiasv27
Copy link

Hi,
There is a problem with the query string sent to Solr, specifically with the fq parameter. It was revealed on our OJS multiple journal instance: the search engine displays articles regardless of which journal they come from. The request sent to Solr looks like this: :

params={mm=1&facet.field[1]=subject_fr_FR_facet&facet.range=publicationDate_dt&facet.field**[0]=discipline_fr_FR_facet&df=authors_txt+title_de_DE+title_en_US+title_es_ES+title_it_IT+title_pt_PT+abstract_de_DE+abstract_en_US+abstract_es_ES+abstract_it_IT+abstract_pt_PT+discipline_en_US+subject_en_US+type_en_US+coverage_en_US&facet.range.gap=%2B1YEAR&facet.range.other=all&hl=on&facet.field[4]=authors_facet&facet.field[3]=coverage_fr_FR_facet&facet.field[2]**=type_fr_FR_facet&start=0&sort=score+desc&rows=25&fq[1]=journal_id:"localhost-7"&fq[0]=inst_id:"localhost"&q=bordeaux&defType=edismax&qf=authors_txt+title_de_DE+title_en_US+title_es_ES+title_it_IT+title_pt_PT+abstract_de_DE+abstract_en_US+abstract_es_ES+abstract_it_IT+abstract_pt_PT+discipline_en_US+subject_en_US+type_en_US+coverage_en_US&spellcheck=on&hl.fl=abstract_de_DE+abstract_en_US+abstract_es_ES+abstract_it_IT+abstract_pt_PT&facet=on&facet.range.start=NOW/YEAR-50YEARS&facet.range.end=NOW}

The parameters query with [0] , [1], ... is not recognized by Solr : arrays must be sent as a repetition of the parameter, such as ...&fq=journal_id:"localhost-7"&fq=inst_id:"localhost" (https://solr.apache.org/guide/solr/latest/query-guide/common-query-parameters.html#fq-filter-query-parameter)

I'll work on a fix and submit a pull request if you don't mind.

Mathias

@ronste
Copy link
Contributor

ronste commented May 23, 2023

Hi @mathiasv27 ,

thanks for your report. As stated in the Readme the OJS Lucence plugin is now maintained by PKP at https://github.com/pkp/lucene.

If you installed it from the PKP Plugin Gallery please post your report there. If you use an older version from this repo I would advise you to switch/upgrade to the plugin version from the plugin gallery. Maybe the problem was solved already.

Best wishes,
Ronald

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants