You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ruby-dev@lucene.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2009/03/05 21:19:08 UTC

Re: sorl-ruby facet.method

First, note we have a ruby-dev@lucene.apache.org list which focuses  
primarily on the solr-ruby library, flare, and other Ruby specific  
things.  But this forum is as good as any, though I'm CC'ing ruby-dev  
too.

On Mar 5, 2009, at 12:59 PM, Ian Connor wrote:
> Is there a way to specify the facet.method using solr-ruby. I tried  
> to add
> it like this:
>
>      hash["facet.method"] = @params[:facets][:method] if
> @params[:facets][:method]

That's a reasonable addition, however we're about to do a refactoring  
of solr-ruby to bring in the great contributions Matt Mitchell has  
been doing with his RSolr project.  We're going to strip away all the  
parameter mangling/mapping and just simply pass through parameters to  
Solr (and leave clever mapping of things like :query -> &q= to folks  
that want to add that construct to their own applications).

> to line 78 of standard.rb and it works when you add it to the facets  
> Hash.
> However, if there is another place that I could set that would be  
> great.

One option is to provide your own request/response classes,  
subclassing Solr::Request(and Response)::Standard if you want to just  
hack this for now.

> I am also happy to submit a patch on a ticket if that works.

The above being said, I'd gladly commit your patch right away.  Submit  
it via JIRA and consider it done.   We'll do one final release (0.9?)  
of the current solr-ruby library before we gut it and simplify it (and  
do our best to provide backwards compatibility to the 0.x versions)  
for a 1.0 version.

	Erik


Re: sorl-ruby facet.method

Posted by Ian Connor <ia...@gmail.com>.
If you want this to switch groups, let me know...

...but it would be good to know benchmarkng like in ActiveRecord so that you
know for a request how much time was spent where.

ActiveRecord logs look like:

JournalAccess Columns (0.107016)   SHOW FIELDS FROM `journal_accesses`
Transform Load (0.107634)   SELECT * FROM `transforms` WHERE
(`transforms`.`name` = 'MIT') LIMIT 1
....

It would be nice if Solr could do the same to pinpoint slow queries so they
could look like this (in an appropriate Solr color):
Solr Delete (0.107016)   id = "123123"
Solr Query (0.107634)   q=*:*&rows=10

I am not sure how hard this would be to plug into the rails logger and if
you could then also make it add up at the end in the summary line for the
request.

However, it certainly would be nice to know and help focus performance
debugging.

On Thu, Mar 5, 2009 at 4:33 PM, Ian Connor <ia...@gmail.com> wrote:

> I agree that remapping params is not that much fun. I certainly vote for
> just passing them through and it will be easier to keep up with the latest
> as well.
>
> I created:
>
> https://issues.apache.org/jira/browse/SOLR-1047
>
> Let me know if there is something else I can do to help.
>
>
> On Thu, Mar 5, 2009 at 3:19 PM, Erik Hatcher <er...@ehatchersolutions.com>wrote:
>
>> First, note we have a ruby-dev@lucene.apache.org list which focuses
>> primarily on the solr-ruby library, flare, and other Ruby specific things.
>>  But this forum is as good as any, though I'm CC'ing ruby-dev too.
>>
>> On Mar 5, 2009, at 12:59 PM, Ian Connor wrote:
>>
>>> Is there a way to specify the facet.method using solr-ruby. I tried to
>>> add
>>> it like this:
>>>
>>>     hash["facet.method"] = @params[:facets][:method] if
>>> @params[:facets][:method]
>>>
>>
>> That's a reasonable addition, however we're about to do a refactoring of
>> solr-ruby to bring in the great contributions Matt Mitchell has been doing
>> with his RSolr project.  We're going to strip away all the parameter
>> mangling/mapping and just simply pass through parameters to Solr (and leave
>> clever mapping of things like :query -> &q= to folks that want to add that
>> construct to their own applications).
>>
>>  to line 78 of standard.rb and it works when you add it to the facets
>>> Hash.
>>> However, if there is another place that I could set that would be great.
>>>
>>
>> One option is to provide your own request/response classes, subclassing
>> Solr::Request(and Response)::Standard if you want to just hack this for now.
>>
>>  I am also happy to submit a patch on a ticket if that works.
>>>
>>
>> The above being said, I'd gladly commit your patch right away.  Submit it
>> via JIRA and consider it done.   We'll do one final release (0.9?) of the
>> current solr-ruby library before we gut it and simplify it (and do our best
>> to provide backwards compatibility to the 0.x versions) for a 1.0 version.
>>
>>        Erik
>>
>>
>
>
> --
> Regards,
>
> Ian Connor
>



-- 
Regards,

Ian Connor

Re: sorl-ruby facet.method

Posted by Ian Connor <ia...@gmail.com>.
I agree that remapping params is not that much fun. I certainly vote for
just passing them through and it will be easier to keep up with the latest
as well.

I created:

https://issues.apache.org/jira/browse/SOLR-1047

Let me know if there is something else I can do to help.

On Thu, Mar 5, 2009 at 3:19 PM, Erik Hatcher <er...@ehatchersolutions.com>wrote:

> First, note we have a ruby-dev@lucene.apache.org list which focuses
> primarily on the solr-ruby library, flare, and other Ruby specific things.
>  But this forum is as good as any, though I'm CC'ing ruby-dev too.
>
> On Mar 5, 2009, at 12:59 PM, Ian Connor wrote:
>
>> Is there a way to specify the facet.method using solr-ruby. I tried to add
>> it like this:
>>
>>     hash["facet.method"] = @params[:facets][:method] if
>> @params[:facets][:method]
>>
>
> That's a reasonable addition, however we're about to do a refactoring of
> solr-ruby to bring in the great contributions Matt Mitchell has been doing
> with his RSolr project.  We're going to strip away all the parameter
> mangling/mapping and just simply pass through parameters to Solr (and leave
> clever mapping of things like :query -> &q= to folks that want to add that
> construct to their own applications).
>
>  to line 78 of standard.rb and it works when you add it to the facets Hash.
>> However, if there is another place that I could set that would be great.
>>
>
> One option is to provide your own request/response classes, subclassing
> Solr::Request(and Response)::Standard if you want to just hack this for now.
>
>  I am also happy to submit a patch on a ticket if that works.
>>
>
> The above being said, I'd gladly commit your patch right away.  Submit it
> via JIRA and consider it done.   We'll do one final release (0.9?) of the
> current solr-ruby library before we gut it and simplify it (and do our best
> to provide backwards compatibility to the 0.x versions) for a 1.0 version.
>
>        Erik
>
>


-- 
Regards,

Ian Connor
1 Leighton St #723
Cambridge, MA 02141
Call Center Phone: +1 (714) 239 3875 (24 hrs)
Fax: +1(770) 818 5697
Skype: ian.connor

Re: sorl-ruby facet.method

Posted by Ian Connor <ia...@gmail.com>.
I agree that remapping params is not that much fun. I certainly vote for
just passing them through and it will be easier to keep up with the latest
as well.

I created:

https://issues.apache.org/jira/browse/SOLR-1047

Let me know if there is something else I can do to help.

On Thu, Mar 5, 2009 at 3:19 PM, Erik Hatcher <er...@ehatchersolutions.com>wrote:

> First, note we have a ruby-dev@lucene.apache.org list which focuses
> primarily on the solr-ruby library, flare, and other Ruby specific things.
>  But this forum is as good as any, though I'm CC'ing ruby-dev too.
>
> On Mar 5, 2009, at 12:59 PM, Ian Connor wrote:
>
>> Is there a way to specify the facet.method using solr-ruby. I tried to add
>> it like this:
>>
>>     hash["facet.method"] = @params[:facets][:method] if
>> @params[:facets][:method]
>>
>
> That's a reasonable addition, however we're about to do a refactoring of
> solr-ruby to bring in the great contributions Matt Mitchell has been doing
> with his RSolr project.  We're going to strip away all the parameter
> mangling/mapping and just simply pass through parameters to Solr (and leave
> clever mapping of things like :query -> &q= to folks that want to add that
> construct to their own applications).
>
>  to line 78 of standard.rb and it works when you add it to the facets Hash.
>> However, if there is another place that I could set that would be great.
>>
>
> One option is to provide your own request/response classes, subclassing
> Solr::Request(and Response)::Standard if you want to just hack this for now.
>
>  I am also happy to submit a patch on a ticket if that works.
>>
>
> The above being said, I'd gladly commit your patch right away.  Submit it
> via JIRA and consider it done.   We'll do one final release (0.9?) of the
> current solr-ruby library before we gut it and simplify it (and do our best
> to provide backwards compatibility to the 0.x versions) for a 1.0 version.
>
>        Erik
>
>


-- 
Regards,

Ian Connor
1 Leighton St #723
Cambridge, MA 02141
Call Center Phone: +1 (714) 239 3875 (24 hrs)
Fax: +1(770) 818 5697
Skype: ian.connor