Combination of a virtual collection with the parameter "Nur Kollektion" in the search plugin brings a null result
Description
We made a virtual collection "Briefe von Wolfgang Borchert" with the elements Aus Nachlass Wolfgang Borchert HANSb* for the solrquery. A query from the serach result list (see reproduction) brings a null result for correct search terms. The solrLogging (see "Screenshots and Examples) gives information about the missing switch from the name of the virtual collection to a proper solrquery as reason for the null result.
Reproduction
Steps to reproduce the behaviour:
- Go to https://digitalisate.sub.uni-hamburg.de/index.php?id=2366
- Choose "Briefe von Wolfgang Borchert"
- Search for "aline" (Part of item 2ff in the browsing list of "Briefe von Wolfgang Borchert")
- See error with a null result
Expected Behavior
We see the benefit of virtual collections and want to place it with correct search results, when a restriction to collection is preset in the search plugin.
Screenshots and Examples
SolrLogging #Suche nach aline in der virtuellen Kollektion 2021-06-04 10:59:03.538 INFO (qtp1979787155-89) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/admin/ping params={json.nl=flat&omitHeader=true&wt=json} hits=2358799 status=0 QTime=0 2021-06-04 10:59:03.538 INFO (qtp1979787155-89) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/admin/ping params={json.nl=flat&omitHeader=true&wt=json} status=0 QTime=0 2021-06-04 10:59:03.631 INFO (qtp1979787155-106) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/select params={q=aline&json.nl=flat&omitHeader=true&fl=,score&start=0&sort=score+desc&fq=collection_faceting:("Briefe+Wolfgang+Borchert")&rows=0&wt=json} hits=0 status=0 QTime=0 2021-06-04 10:59:03.707 INFO (qtp1979787155-102) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/select params={q={!join+from%3Duid+to%3Duid}aline&json.nl=flat&omitHeader=true&fl=uid,id&start=0&sort=score+desc&fq={!join+from%3Duid+to%3Duid}collection_faceting:("Briefe+Wolfgang+Borchert")&fq=toplevel:true&rows=0&wt=json} hits=0 status=0 QTime=0 2021-06-04 10:59:03.888 INFO (qtp1979787155-125) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/admin/ping params={json.nl=flat&omitHeader=true&wt=json} hits=2358799 status=0 QTime=0 2021-06-04 10:59:03.888 INFO (qtp1979787155-125) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/admin/ping params={json.nl=flat&omitHeader=true&wt=json} status=0 QTime=0 2021-06-04 10:59:03.970 INFO (qtp1979787155-85) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/select params={f.year_faceting.facet.sort=count&facet.field={!key%3Dtype_faceting}type_faceting&facet.field={!key%3Dplace_faceting}place_faceting&facet.field={!key%3Dyear_faceting}year_faceting&facet.field={!key%3DDocLanguage_faceting}DocLanguage_faceting&facet.field={!key%3Dcollection_faceting}collection_faceting&json.nl=flat&fl=,score&f.year_faceting.facet.limit=30&f.DocLanguage_faceting.facet.limit=30&start=0&sort=score+desc&fq=collection_faceting:("Briefe+Wolfgang+Borchert")&rows=0&q=aline&f.place_faceting.facet.limit=30&f.type_faceting.facet.sort=count&omitHeader=true&f.collection_faceting.facet.sort=count&f.type_faceting.facet.limit=30&f.place_faceting.facet.sort=count&f.DocLanguage_faceting.facet.sort=count&f.collection_faceting.facet.limit=30&wt=json&facet=true} hits=0 status=0 QTime=2 2021-06-04 10:59:04.060 INFO (qtp1979787155-28) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/select params={q=aline&json.nl=flat&omitHeader=true&fl=*,score&start=0&sort=score+desc&fq=collection_faceting:("Briefe+Wolfgang+Borchert")&rows=0&wt=json} hits=0 status=0 QTime=0 2021-06-04 10:59:04.172 INFO (qtp1979787155-90) [ x:dlfCore0] o.a.s.c.S.Request [dlfCore0] webapp=/solr path=/select params={q={!join+from%3Duid+to%3Duid}aline&json.nl=flat&omitHeader=true&fl=uid,id&start=0&sort=score+desc&fq={!join+from%3Duid+to%3Duid}collection_faceting:("Briefe+Wolfgang+Borchert")&fq=toplevel:true&rows=25&wt=json} hits=0 status=0 QTime=0
Environment
- OS version: Debian Linux 4.19 (Host Europe/effective webwork)
- RDBMS version: MySQL 5.5.5
- Apache Solr version: 7.4.0
- TYPO3 version: 8.7.25
- PHP version: 7.1.33
I think, you're right. This feature is not implemented.
If you search in a virtual collection, you won't find anything. Because the collection name is not added to the documents collections field. If this would be done, the current solr query would work.
Another approach would be to combine the index_search for the virtual collection with the search term in case of a virtual collection.