LibreCat / Catmandu-Solr

https://metacpan.org/release/Catmandu-Solr
0 stars 4 forks source link

Command line support for "bagless" Solr indexes #9

Closed phochste closed 2 years ago

phochste commented 7 years ago

Using the Perl API of Catmandu one can access data in a Solr installation that doesn't have the notion of 'bags':

  my $store = Catmandu->store('Solr');
  $store->bag->searcher(query => 'any solr query')->each(sub {
  });

This is probably a bug that the bag doesn't have any effect in this code. But it is also a very nice feature to be able to support "bagless" Solr installations.

However, with the command line tools the "bag" is enforced in the Solr query on line 33: https://github.com/LibreCat/Catmandu-Solr/blob/master/lib/Catmandu/Store/Solr/Bag.pm#L33

This gives no results in "bagless" installations

  $ catmandu export Solr to YAML

Can searcher keep the support for bagless queries. Can this support also be added to the generator?

nicolasfranck commented 7 years ago

On my system the Searcher actually does use the bag as a filter (fq=_bag:data). Maybe your installation of Catmandu::Solr should be updated?

It's strange that the export command actually uses this searcher instead of Catmandu::Importer::Solr?

As for the "bagless" support: