Hi Pat, But Can you please tell me why I get that error for incompatible schema.
Thanks On Sun, Aug 30, 2009 at 3:37 PM, Pat Allan <[email protected]> wrote: > > Hi Sumeet > > It looks like you're using a custom library for PostgreSQL, and I'm > not even that experienced with that database system, so this is all > guesswork, but we need to return each point. > > Would something like the following work? > > has 'RADIANS(st_x(st_astest(location_geom)))', :as > => :latitude, :type => :float > has 'RADIANS(st_y(st_astest(location_geom)))', :as > => :longitude, :type => :float > > I'm not sure if I'm using the right methods, but you'll need to do > something like that to get it working with Sphinx. > > -- > Pat > > On 29/08/2009, at 7:43 PM, sumeet panchal wrote: > > > > > Hi, > > > > This is data normally in my column > > (0101000020AD1000000000000000C041406666666666D65CC0) its a geometry > > point. > > and when I did this : > > select st_astext(location_geom) from <table> where id=1; > > It gives: POINT(35.5 -115.35). > > this is type for column: location_geom :geometry point, 4269 > > biggest problem I am facing the error: > > ERROR: index 'working_asset_core': incompatible schemas: attribute > > count mismatch: 4 in schema 'working_asset_core_1', 5 in schema > > 'working_asset_core_0'. Whenever I try to add the attribute to > > define_index it gives me this error. > > > > thanks > > > > On Aug 29, 3:32 am, Pat Allan <[email protected]> wrote: > >> Hi Sumeet > >> > >> Can you give us an example of the data inside that column? Then I > >> might be able to suggest a SQL snippet to extract latitude and > >> longitude out for attributes. > >> > >> -- > >> Pat > >> > >> On 29/08/2009, at 12:54 AM, sumeet panchal wrote: > >> > >> > >> > >>> hi I am struggling with this for so long. > >> > >>> I have a field named location_geom : (geometry point). It have > >>> latitude and longitude. It stores value using georuby. > >>> So we can have methods like lat lon x y on it. > >>> Problem is that I want an attribute from it > >> > >>> What I did is > >> > >>> define_index > >>> indexes :name > >>> has "location_geom.lat" , :as => :latitude, :type => :float > >>> end > >> > >>> I need to index this field, if possible separately in latitude and > >>> longitude. > >>> please help. > >> > >>> And I also get an error again and again in indexing it is: > >>> when i do rake ts:in > >> > >>> ERROR: index 'working_asset_core': incompatible schemas: attribute > >>> count mismatch: 4 in schema 'working_asset_core_1', 5 in schema > >>> 'working_asset_core_0'. > >> > >>> what is cause and solution for this. > >>> Please Help. > >> > >>> Thanks > >>> Sumeet > >> > >> > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
