Definitive version of acts_as_solr

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Definitive version of acts_as_solr

Jacob Elder-4
What versions of acts_as_solr are you all using?

There appears to be about a dozen forks on GitHub, including my own.
http://acts-as-solr.rubyforge.org/ has a notice that the official site is
now http://acts_as_solr.railsfreaks.com/, but *don't click that
link*because it's just a mess of pop-up ads now. It would be great to
get some
consolidation and agreement from the community.

--
Jacob Elder
Reply | Threaded
Open this post in threaded view
|

Re: Definitive version of acts_as_solr

Erik Hatcher-4
Jacob,

Yeah, it really is a big mess with acts_as_solr.  I blame a few  
things: 1) me - for not wrangling this thing into Solr's client/ruby  
area from the start, 2) Rubyists!  (Apache's svn isn't an appealing  
home) and 3) the git craze promoting fork-mania.

And take a look at this ridiculous bug (in at least one fork) of  
acts_as_solr: <http://groups.google.com/group/acts_as_solr/browse_thread/thread/4e1dee03a46c6415 
 >

So... what do we do?

Can we get the best version of acts_as_solr donated to Solr's svn?  
Who can rightfully say where the IP of that comes from so we can  
ensure it's provenance is clear and cool by all who touched the  
code?   Or maybe we just start from scratch with the simplest thing  
that can possibly work (like my acts_as_solr_"lite" (page 13 of http://code4lib.org/files/solr-ruby.pdf)
  and iterate from there in Apache's svn?

        Erik


On Dec 11, 2009, at 7:52 PM, Jacob Elder wrote:

> What versions of acts_as_solr are you all using?
>
> There appears to be about a dozen forks on GitHub, including my own.
> http://acts-as-solr.rubyforge.org/ has a notice that the official  
> site is
> now http://acts_as_solr.railsfreaks.com/, but *don't click that
> link*because it's just a mess of pop-up ads now. It would be great to
> get some
> consolidation and agreement from the community.
>
> --
> Jacob Elder

Reply | Threaded
Open this post in threaded view
|

Re: Definitive version of acts_as_solr

Andrea Campi
Hi all,

On Dec 11, 2009, at 7:52 PM, Jacob Elder wrote:

> What versions of acts_as_solr are you all using?
>
> There appears to be about a dozen forks on GitHub, including my own.
> http://acts-as-solr.rubyforge.org/ has a notice that the official site is
> now http://acts_as_solr.railsfreaks.com/, but *don't click that
> link*because it's just a mess of pop-up ads now. It would be great to
> get some
> consolidation and agreement from the community.
I agree, it is a mess; I'm sure it will only get worse as people
complete the migration to Solr 1.4, as there are a bunch of features you
can't easily access through acts_as_solr.

At my company we use acts_as_solr extensively, which means I have my own
fork at http://github.com/andreacampi/acts_as_solr , and even worse our
local git repo has even more changes, integrating patches collected here
and there on the net (we didn't find the time yet to push them out to
github).

Of course that's far from ideal. It would be good to get that cleared
up. I would have done it already, except for the chronic lack of time.
But then again... read below.

Erik Hatcher wrote:
> And take a look at this ridiculous bug (in at least one fork) of
> acts_as_solr:
> <http://groups.google.com/group/acts_as_solr/browse_thread/thread/4e1dee03a46c6415>
>
I doubt it's just in one fork; acts_as_solr does too many magical things
that end up biting you in the ass as soon as you do something slightly
more complex.
In our local fork I removed all the magic that deals with field types
(not just suffixes, there are other related issues I can't remember
right now).

> So... what do we do?
>
> Can we get the best version of acts_as_solr donated to Solr's svn?  
> Who can rightfully say where the IP of that comes from so we can
> ensure it's provenance is clear and cool by all who touched the
> code?   Or maybe we just start from scratch with the simplest thing
> that can possibly work (like my acts_as_solr_"lite" (page 13 of
> http://code4lib.org/files/solr-ruby.pdf) and iterate from there in
> Apache's svn?
Frankly, at this stage I would advise against spending any more time on
acts_as_solr, unless a more extensive redesign is undertaken.
acts_as_solr is very convenient as a way to publish models to Solr, but
the search API is sorely lacking, and it's way too complicated.
ParserMethods#parse_query is plain weird, willy-nilly calling options by
a different name to the one the underlying library does; and so on (one
example really stands out: to specify a filter query you have to use
options[:facets][:browse] even though you may not be doing any faceting
at all).

I would love to see the find_* methods be implemented as thin wrappers
on top of the ruby solr library, with the main (only?) difference being
that they return ActiveRecord objects. This would make acts_as_solr less
surprising, more reliable but also let us use any new feature that
requires new parameters with no changes.
And if I can dream, I would also like to see rsolr's syntax
supported--maybe acts_as_solr should be an adapter on top of your choice
of either underlying library?

And... starting from your acts_as_solr_lite does sound like an option,
actually!
It would probably be quite a lot of work, but it would result in
something much cleaner.

So I would say the next step should be a list of "likes" and "don't
likes", see if we can get consensus, and see if we can get people to
work on it :)

Bye,
     Andrea