This is due to the way acts_as_solr builds the query within parser_methods.rb
There are few changes you will need to make within parser_methods.rb
Change
models = "AND #{solr_configuration[:type_field]}:#self.name}"
to
models = "#{solr_configuration[:type_field]}:#self.name}"
Then don't include the constructed models string into the query.
query = "(#{query.gsub(/ *: */,"_t:")}) #{models}"
Change this to just
query = "(#{query.gsub(/ *: */,"_t:")})"
Now you will need to force the models portion of this query into the search over to SOLR.
I did this with.....
query_options[:fq_model] = models
Went over to standard.rb
Made sure to add
:fq_model
into the VALID_PARAMS Array.
Added the following
if @params[:fq_model]
hash["fq"] = @params[:fq_model]
end
I added some extra cases but you shouldn't need them if unless you want to make :fq an option on find_by_solr.
After I had these all in place I can now search for the model name and I get the much smaller result set I would expect.
Chances are that multi_solr_search will need updates to work as well since it appears that the type_t portion of the query is hard coded into that method.
Figured most of this out when I ran into some highlighting issues related to this question.
http://stackoverflow.com/questions/2548750/highlighting-in-solr-1-4-requirefieldmatch