Perfect, thanks Pat.  I sent in a github pull request for another
postgresql specific problem that I ran into.  I'm new to thinking-
sphinx, but so far it's been great, thank you!
Doug

On Dec 14, 11:33 pm, Pat Allan <[email protected]> wrote:
> Hi Doug
>
> There is a group_by method for define_index - it's not widely  
> documented (err, if at all).
>
> So in your example, you could add:
>
>    group_by "the_geom"
>
> Generally it's not an issue in MySQL - since it defaults to being lazy  
> about GROUP BY clauses - and that seems to be the database most people  
> are using with Sphinx.
>
> That aside, github pull requests are *definitely* the best way to get  
> patches to me. I'm running a bit behind on keeping up with them  
> though, so if there's a lack of responses, that'd be why.
>
> Cheers
>
> --
> Pat
>
> On 15/12/2008, at 3:24 AM, Doug wrote:
>
>
>
> > Unless I'm mistaken there doesn't seem to be a way to specify which
> > column a string attribute uses for the group by syntax (in an
> > environment where use_group_by_shortcut? is false):
>
> > define_index do
> >  has "X(the_geom)", :as => :x, :type => :float
> > end
>
> > will fail with an error like:
>
> > ERROR: index 'foo_core': sql_range_query: ERROR:  column
> > "foo.the_geom" must appear in the GROUP BY clause or be used in an
> > aggregate function
>
> > Am I missing something?  If not, I'll go ahead and write a patch.
> > Probably an option like  :column_name => 'the_geom' if that sounds
> > good to people.  Are github pull requests the best way to submit
> > patches?
> > Doug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to