[Catalyst] Working a Solr Model

neil.lunn neil at mylunn.id.au
Mon Sep 30 07:53:40 GMT 2013

On 29/09/2013 5:54 PM, John Karr wrote:
> WebService::Solr only implements the LWP agent part of working with 
> Solr, which still leaves one to extract the actual JSON what LWP gives 
> you, plus it has fatal wide-character issues that "use utf8::all" 
> isn't able to fix, and also does not support xml and csv (other 
> formats solr can provide).
Actually will parse a response as a WebService::Solr::Document (or 
actually a collection of) with accessors to fields and a to_xml method, 
which I have used in production.

The LWP agent part can be set to what you want. Say, 
AnyEvent::HTTP::LWP::UserAgent or other if you wish, which is good when 
running Catalyst in an event environment. And as other format loaders 
are just HTTP Post interfaces then you can just intropect the Agent ( 
->agent ) from WebService::Solr.

Have used the above to create 100MB XML documents and post those to Solr 

> Apache::Solr is much nicer in that it provides something resumbling a 
> dbic result set, but I've already encountered a few things that seem 
> like bugs and sending the resultsetlike object to the stash in the 
> same way as a dbic resultset doesn't seem to work the same way.
> Are other people using Solr based models? if so are you using either 
> of the two CPAN modules or something else? Do you have examples and or 
> notes you can share?
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: 
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

More information about the Catalyst mailing list