source listing_core_0
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass =
sql_db = usa_listings_development
sql_query_pre = SET NAMES utf8
sql_query = SELECT SQL_NO_CACHE `listings`.`id` * 3 + 0 AS `id` ,
CAST(`listings`.`name` AS CHAR) AS `name`, CAST(`categories`.`name` AS
CHAR) AS `category_name`, `listings`.`id` AS `sphinx_internal_id`,
79524168 AS `class_crc`, '79524168' AS `subclass_crcs`, 0 AS
`sphinx_deleted`, IFNULL(`listings`.`name`, '') AS `name_sort`,
`listings`.`id` AS `id` FROM `listings` LEFT OUTER JOIN `categories`
ON `categories`.id = `listings`.category_code WHERE `listings`.`id` >=
$start AND `listings`.`id` <= $end GROUP BY `listings`.`id` ORDER BY
NULL
sql_query_range = SELECT IFNULL(MIN(`id`), 1), IFNULL(MAX(`id`), 1)
FROM `listings`
sql_attr_uint = sphinx_internal_id
sql_attr_uint = class_crc
sql_attr_uint = sphinx_deleted
sql_attr_uint = id
sql_attr_str2ordinal = name_sort
sql_attr_multi = uint subclass_crcs from field
sql_query_info = SELECT * FROM `listings` WHERE `id` = (($id - 0) /
3)
}
On Jan 15, 7:10 pm, Pat Allan <[email protected]> wrote:
> And what's the sql_query in your Listing source in
> config/development.sphinx.conf?
>
> --
> Pat
>
> On 16/01/2010, at 6:27 AM, djfobbz wrote:
>
>
>
> > class Category < ActiveRecord::Base
> > has_many :listings, :class_name => 'Listing', :primary_key
> > => :sic_code, :foreign_key => :category_code
> > end
>
> > class Listing < ActiveRecord::Base
> > belongs_to :category, :class_name => 'Category', :primary_key
> > => :sic_code, :foreign_key => :category_code
>
> > define_index do
> > indexes :name, :sortable => true
> > indexes category.name, :as => :category_name
> > set_property(:morphology => 'stem_en')
> > set_property(:enable_star => true)
> > set_property(:min_infix_len => 3)
> > end
> > end
> > --
> > 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
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.
--
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.