Hmm, there's a lot of models missing, comparing the two files. And everything
that's there is duplicated...
In script/console, what's the output of the following:
ThinkingSphinx.context.indexed_models
--
Pat
On 06/01/2010, at 1:11 AM, rahul100885 wrote:
> Sorry Pat
> Actually I posted wrong file.
> pravious file is generated when I use thinking sphinx version 1.3.5
>
> This is correct file of version 1.3.14
>
>
> indexer
> {
> mem_limit = 1024M
> }
>
> searchd
> {
> listen = 127.0.0.1:3310
> log = /home/rahul/application/demo/log/searchd.log
> query_log = /home/rahul/application/demo/log/searchd.query.log
> pid_file = /home/rahul/application/demo/log/searchd.development.pid
> }
>
> source account_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "accounts" SET "delta" = FALSE WHERE "delta"
> = TRUE
> sql_query = SELECT "accounts"."id" * 6 + 0 AS "id" ,
> "accounts"."name" AS "account_name", array_to_string(array_accum
> (COALESCE("contacts"."first_name", '0')), ' ') AS
> "contact_first_name", array_to_string(array_accum(COALESCE
> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
> "accounts"."delta" = FALSE AND accounts.deleted_at is null GROUP BY
> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
> "accounts"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 0) /
> 6)
> }
>
> index account_core
> {
> source = account_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> account_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = account_name, contact_first_name, contact_last_name,
> contact_email
> enable_star = 1
> }
>
> source account_delta_0 : account_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "accounts"."id" * 6 + 0 AS "id" ,
> "accounts"."name" AS "account_name", array_to_string(array_accum
> (COALESCE("contacts"."first_name", '0')), ' ') AS
> "contact_first_name", array_to_string(array_accum(COALESCE
> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
> "accounts"."delta" = TRUE AND accounts.deleted_at is null GROUP BY
> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
> "accounts"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 0) /
> 6)
> }
>
> index account_delta : account_core
> {
> source = account_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> account_delta
> }
>
> index account
> {
> type = distributed
> local = account_delta
> local = account_core
> }
>
> source account_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "accounts" SET "delta" = FALSE WHERE "delta"
> = TRUE
> sql_query = SELECT "accounts"."id" * 6 + 0 AS "id" ,
> "accounts"."name" AS "account_name", array_to_string(array_accum
> (COALESCE("contacts"."first_name", '0')), ' ') AS
> "contact_first_name", array_to_string(array_accum(COALESCE
> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
> "accounts"."delta" = FALSE AND accounts.deleted_at is null GROUP BY
> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
> "accounts"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 0) /
> 6)
> }
>
> index account_core
> {
> source = account_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> account_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = account_name, contact_first_name, contact_last_name,
> contact_email
> enable_star = 1
> }
>
> source account_delta_0 : account_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "accounts"."id" * 6 + 0 AS "id" ,
> "accounts"."name" AS "account_name", array_to_string(array_accum
> (COALESCE("contacts"."first_name", '0')), ' ') AS
> "contact_first_name", array_to_string(array_accum(COALESCE
> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
> "accounts"."delta" = TRUE AND accounts.deleted_at is null GROUP BY
> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
> "accounts"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 0) /
> 6)
> }
>
> index account_delta : account_core
> {
> source = account_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> account_delta
> }
>
> index account
> {
> type = distributed
> local = account_delta
> local = account_core
> }
>
> source contact_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "contacts" SET "delta" = FALSE WHERE "delta"
> = TRUE
> sql_query = SELECT "contacts"."id" * 6 + 1 AS "id" ,
> "contacts"."first_name" AS "first_name", "contacts"."last_name" AS
> "last_name", "contacts"."email" AS "email", "accounts"."name" AS
> "contact_account_name", "contacts"."id" AS "sphinx_internal_id",
> 2212487076 AS "class_crc", '2212487076' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "contacts"."id" AS "id", "contacts"."company_id" AS
> "company_id", "contacts"."status_type" AS "status_type",
> "accounts"."id" AS "contact_account_id" FROM "contacts" LEFT OUTER
> JOIN "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "contacts"."id" >= $start AND "contacts"."id" <= $end AND
> "contacts"."delta" = FALSE AND status_type in (select id from lookups
> where (type='ProspectStatusType' or type = 'LeadStatusType') and
> lvalue<>'Rejected') or contacts.deleted_at is null GROUP BY
> "contacts"."id", "contacts"."first_name", "contacts"."last_name",
> "contacts"."email", "accounts"."name", "contacts"."id",
> "contacts"."id", "contacts"."company_id", "contacts"."status_type",
> "accounts"."id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "contacts" WHERE "contacts"."delta" = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_uint = status_type
> sql_attr_uint = contact_account_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "contacts" WHERE "id" = (($id - 1) /
> 6)
> }
>
> index contact_core
> {
> source = contact_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> contact_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = first_name, last_name, email, contact_account_name
> enable_star = 1
> }
>
> source contact_delta_0 : contact_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "contacts"."id" * 6 + 1 AS "id" ,
> "contacts"."first_name" AS "first_name", "contacts"."last_name" AS
> "last_name", "contacts"."email" AS "email", "accounts"."name" AS
> "contact_account_name", "contacts"."id" AS "sphinx_internal_id",
> 2212487076 AS "class_crc", '2212487076' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "contacts"."id" AS "id", "contacts"."company_id" AS
> "company_id", "contacts"."status_type" AS "status_type",
> "accounts"."id" AS "contact_account_id" FROM "contacts" LEFT OUTER
> JOIN "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "contacts"."id" >= $start AND "contacts"."id" <= $end AND
> "contacts"."delta" = TRUE AND status_type in (select id from lookups
> where (type='ProspectStatusType' or type = 'LeadStatusType') and
> lvalue<>'Rejected') or contacts.deleted_at is null GROUP BY
> "contacts"."id", "contacts"."first_name", "contacts"."last_name",
> "contacts"."email", "accounts"."name", "contacts"."id",
> "contacts"."id", "contacts"."company_id", "contacts"."status_type",
> "accounts"."id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "contacts" WHERE "contacts"."delta" = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_uint = status_type
> sql_attr_uint = contact_account_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "contacts" WHERE "id" = (($id - 1) /
> 6)
> }
>
> index contact_delta : contact_core
> {
> source = contact_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> contact_delta
> }
>
> index contact
> {
> type = distributed
> local = contact_delta
> local = contact_core
> }
>
> source contact_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "contacts" SET "delta" = FALSE WHERE "delta"
> = TRUE
> sql_query = SELECT "contacts"."id" * 6 + 1 AS "id" ,
> "contacts"."first_name" AS "first_name", "contacts"."last_name" AS
> "last_name", "contacts"."email" AS "email", "accounts"."name" AS
> "contact_account_name", "contacts"."id" AS "sphinx_internal_id",
> 2212487076 AS "class_crc", '2212487076' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "contacts"."id" AS "id", "contacts"."company_id" AS
> "company_id", "contacts"."status_type" AS "status_type",
> "accounts"."id" AS "contact_account_id" FROM "contacts" LEFT OUTER
> JOIN "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "contacts"."id" >= $start AND "contacts"."id" <= $end AND
> "contacts"."delta" = FALSE AND status_type in (select id from lookups
> where (type='ProspectStatusType' or type = 'LeadStatusType') and
> lvalue<>'Rejected') or contacts.deleted_at is null GROUP BY
> "contacts"."id", "contacts"."first_name", "contacts"."last_name",
> "contacts"."email", "accounts"."name", "contacts"."id",
> "contacts"."id", "contacts"."company_id", "contacts"."status_type",
> "accounts"."id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "contacts" WHERE "contacts"."delta" = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_uint = status_type
> sql_attr_uint = contact_account_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "contacts" WHERE "id" = (($id - 1) /
> 6)
> }
>
> index contact_core
> {
> source = contact_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> contact_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = first_name, last_name, email, contact_account_name
> enable_star = 1
> }
>
> source contact_delta_0 : contact_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "contacts"."id" * 6 + 1 AS "id" ,
> "contacts"."first_name" AS "first_name", "contacts"."last_name" AS
> "last_name", "contacts"."email" AS "email", "accounts"."name" AS
> "contact_account_name", "contacts"."id" AS "sphinx_internal_id",
> 2212487076 AS "class_crc", '2212487076' AS "subclass_crcs", 0 AS
> "sphinx_deleted", "contacts"."id" AS "id", "contacts"."company_id" AS
> "company_id", "contacts"."status_type" AS "status_type",
> "accounts"."id" AS "contact_account_id" FROM "contacts" LEFT OUTER
> JOIN "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "contacts"."id" >= $start AND "contacts"."id" <= $end AND
> "contacts"."delta" = TRUE AND status_type in (select id from lookups
> where (type='ProspectStatusType' or type = 'LeadStatusType') and
> lvalue<>'Rejected') or contacts.deleted_at is null GROUP BY
> "contacts"."id", "contacts"."first_name", "contacts"."last_name",
> "contacts"."email", "accounts"."name", "contacts"."id",
> "contacts"."id", "contacts"."company_id", "contacts"."status_type",
> "accounts"."id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "contacts" WHERE "contacts"."delta" = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_uint = status_type
> sql_attr_uint = contact_account_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "contacts" WHERE "id" = (($id - 1) /
> 6)
> }
>
> index contact_delta : contact_core
> {
> source = contact_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> contact_delta
> }
>
> index contact
> {
> type = distributed
> local = contact_delta
> local = contact_core
> }
>
> source opportunity_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "opportunities" SET "delta" = FALSE WHERE
> "delta" = TRUE
> sql_query = SELECT "opportunities"."id" * 6 + 4 AS "id" ,
> "opportunities"."name" AS "opportunity_name", "contacts"."first_name"
> AS "contact_first_name", "contacts"."last_name" AS
> "contact_last_name", "contacts"."email" AS "contact_email",
> "accounts"."name" AS "opportunity_conatct_account_name",
> "opportunities"."id" AS "sphinx_internal_id", 85281792 AS "class_crc",
> '85281792' AS "subclass_crcs", 0 AS "sphinx_deleted",
> "opportunities"."id" AS "id", "opportunities"."company_id" AS
> "company_id" FROM "opportunities" LEFT OUTER JOIN "contacts" ON
> "contacts".id = "opportunities".contact_id LEFT OUTER JOIN
> "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "opportunities"."id" >= $start AND "opportunities"."id" <= $end AND
> "opportunities"."delta" = FALSE AND opportunities.deleted_at is null
> GROUP BY "opportunities"."id", "opportunities"."name",
> "contacts"."first_name", "contacts"."last_name", "contacts"."email",
> "accounts"."name", "opportunities"."id", "opportunities"."id",
> "opportunities"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "opportunities" WHERE "opportunities"."delta"
> = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "opportunities" WHERE "id" = (($id -
> 4) / 6)
> }
>
> index opportunity_core
> {
> source = opportunity_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> opportunity_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = opportunity_name, contact_first_name,
> contact_last_name, contact_email, opportunity_conatct_account_name
> enable_star = 1
> }
>
> source opportunity_delta_0 : opportunity_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "opportunities"."id" * 6 + 4 AS "id" ,
> "opportunities"."name" AS "opportunity_name", "contacts"."first_name"
> AS "contact_first_name", "contacts"."last_name" AS
> "contact_last_name", "contacts"."email" AS "contact_email",
> "accounts"."name" AS "opportunity_conatct_account_name",
> "opportunities"."id" AS "sphinx_internal_id", 85281792 AS "class_crc",
> '85281792' AS "subclass_crcs", 0 AS "sphinx_deleted",
> "opportunities"."id" AS "id", "opportunities"."company_id" AS
> "company_id" FROM "opportunities" LEFT OUTER JOIN "contacts" ON
> "contacts".id = "opportunities".contact_id LEFT OUTER JOIN
> "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "opportunities"."id" >= $start AND "opportunities"."id" <= $end AND
> "opportunities"."delta" = TRUE AND opportunities.deleted_at is null
> GROUP BY "opportunities"."id", "opportunities"."name",
> "contacts"."first_name", "contacts"."last_name", "contacts"."email",
> "accounts"."name", "opportunities"."id", "opportunities"."id",
> "opportunities"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "opportunities" WHERE "opportunities"."delta"
> = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "opportunities" WHERE "id" = (($id -
> 4) / 6)
> }
>
> index opportunity_delta : opportunity_core
> {
> source = opportunity_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> opportunity_delta
> }
>
> index opportunity
> {
> type = distributed
> local = opportunity_delta
> local = opportunity_core
> }
>
> source opportunity_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre = UPDATE "opportunities" SET "delta" = FALSE WHERE
> "delta" = TRUE
> sql_query = SELECT "opportunities"."id" * 6 + 4 AS "id" ,
> "opportunities"."name" AS "opportunity_name", "contacts"."first_name"
> AS "contact_first_name", "contacts"."last_name" AS
> "contact_last_name", "contacts"."email" AS "contact_email",
> "accounts"."name" AS "opportunity_conatct_account_name",
> "opportunities"."id" AS "sphinx_internal_id", 85281792 AS "class_crc",
> '85281792' AS "subclass_crcs", 0 AS "sphinx_deleted",
> "opportunities"."id" AS "id", "opportunities"."company_id" AS
> "company_id" FROM "opportunities" LEFT OUTER JOIN "contacts" ON
> "contacts".id = "opportunities".contact_id LEFT OUTER JOIN
> "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "opportunities"."id" >= $start AND "opportunities"."id" <= $end AND
> "opportunities"."delta" = FALSE AND opportunities.deleted_at is null
> GROUP BY "opportunities"."id", "opportunities"."name",
> "contacts"."first_name", "contacts"."last_name", "contacts"."email",
> "accounts"."name", "opportunities"."id", "opportunities"."id",
> "opportunities"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "opportunities" WHERE "opportunities"."delta"
> = FALSE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "opportunities" WHERE "id" = (($id -
> 4) / 6)
> }
>
> index opportunity_core
> {
> source = opportunity_core_0
> path = /home/rahul/application/demo/db/sphinx/development/
> opportunity_core
> morphology = none
> min_word_len = 2
> charset_type = utf-8
> min_prefix_len = 2
> prefix_fields = opportunity_name, contact_first_name,
> contact_last_name, contact_email, opportunity_conatct_account_name
> enable_star = 1
> }
>
> source opportunity_delta_0 : opportunity_core_0
> {
> type = pgsql
> sql_host = 127.0.0.1
> sql_user = *****
> sql_pass = *****
> sql_db = demo_dev_29122009
> sql_query_pre =
> sql_query = SELECT "opportunities"."id" * 6 + 4 AS "id" ,
> "opportunities"."name" AS "opportunity_name", "contacts"."first_name"
> AS "contact_first_name", "contacts"."last_name" AS
> "contact_last_name", "contacts"."email" AS "contact_email",
> "accounts"."name" AS "opportunity_conatct_account_name",
> "opportunities"."id" AS "sphinx_internal_id", 85281792 AS "class_crc",
> '85281792' AS "subclass_crcs", 0 AS "sphinx_deleted",
> "opportunities"."id" AS "id", "opportunities"."company_id" AS
> "company_id" FROM "opportunities" LEFT OUTER JOIN "contacts" ON
> "contacts".id = "opportunities".contact_id LEFT OUTER JOIN
> "account_contacts" ON ("contacts"."id" =
> "account_contacts"."contact_id") LEFT OUTER JOIN "accounts" ON
> ("accounts"."id" = "account_contacts"."account_id") WHERE
> "opportunities"."id" >= $start AND "opportunities"."id" <= $end AND
> "opportunities"."delta" = TRUE AND opportunities.deleted_at is null
> GROUP BY "opportunities"."id", "opportunities"."name",
> "contacts"."first_name", "contacts"."last_name", "contacts"."email",
> "accounts"."name", "opportunities"."id", "opportunities"."id",
> "opportunities"."company_id"
> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
> ("id"), 1::bigint) FROM "opportunities" WHERE "opportunities"."delta"
> = TRUE
> sql_attr_uint = sphinx_internal_id
> sql_attr_uint = class_crc
> sql_attr_uint = sphinx_deleted
> sql_attr_uint = id
> sql_attr_uint = company_id
> sql_attr_multi = uint subclass_crcs from field
> sql_query_info = SELECT * FROM "opportunities" WHERE "id" = (($id -
> 4) / 6)
> }
>
> index opportunity_delta : opportunity_core
> {
> source = opportunity_delta_0
> path = /home/rahul/application/demo/db/sphinx/development/
> opportunity_delta
> }
>
> index opportunity
> {
> type = distributed
> local = opportunity_delta
> local = opportunity_core
> }
>
>
>
>
>
> On Jan 5, 6:49 pm, rahul100885 <[email protected]> wrote:
>> ######################################### development.sphinx.conf
>> #############################################
>>
>> indexer
>> {
>> mem_limit = 1024M
>>
>> }
>>
>> searchd
>> {
>> address = 127.0.0.1
>> port = 3310
>> log = /home/rahul/application/demo/log/searchd.log
>> query_log = /home/rahul/application/demo/log/searchd.query.log
>> pid_file = /home/rahul/application/demo/log/searchd.development.pid
>>
>> }
>>
>> source matter_core_0
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre = UPDATE "matters" SET "delta" = FALSE WHERE "delta" =
>> TRUE
>> sql_query = SELECT "matters"."id" * 6 + 0 AS "id" , "matters"."name"
>> AS "matter_name", "users"."first_name" AS "contact_first_name",
>> "users"."last_name" AS "contact_last_name", "matters"."id" AS
>> "sphinx_internal_id", 3077742169 AS "class_crc", '3077742169' AS
>> "subclass_crcs", 0 AS "sphinx_deleted", "matters"."id" AS "id",
>> "matters"."company_id" AS "company_id" FROM "matters" LEFT OUTER
>> JOIN "users" ON "users".id = "matters".employee_user_id WHERE
>> "matters"."id" >= $start AND "matters"."id" <= $end AND
>> "matters"."delta" = FALSE GROUP BY "matters"."id", "matters"."name",
>> "users"."first_name", "users"."last_name", "matters"."id",
>> "matters"."id", "matters"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "matters" WHERE "matters"."delta" = FALSE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "matters" WHERE "id" = (($id - 0) /
>> 6)
>>
>> }
>>
>> source matter_core_1
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre = UPDATE "matters" SET "delta" = FALSE WHERE "delta" =
>> TRUE
>> sql_query = SELECT "matters"."id" * 6 + 0 AS "id" , "matters"."name"
>> AS "matter_name", "users"."first_name" AS "contact_first_name",
>> "users"."last_name" AS "contact_last_name", "matters"."id" AS
>> "sphinx_internal_id", 3077742169 AS "class_crc", '3077742169' AS
>> "subclass_crcs", 0 AS "sphinx_deleted", "matters"."id" AS "id",
>> "matters"."company_id" AS "company_id" FROM "matters" LEFT OUTER
>> JOIN "users" ON "users".id = "matters".employee_user_id WHERE
>> "matters"."id" >= $start AND "matters"."id" <= $end AND
>> "matters"."delta" = FALSE GROUP BY "matters"."id", "matters"."name",
>> "users"."first_name", "users"."last_name", "matters"."id",
>> "matters"."id", "matters"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "matters" WHERE "matters"."delta" = FALSE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "matters" WHERE "id" = (($id - 0) /
>> 6)
>>
>> }
>>
>> index matter_core
>> {
>> source = matter_core_0
>> source = matter_core_1
>> path = /home/rahul/application/demo/db/sphinx/development/
>> matter_core
>> morphology = none
>> min_word_len = 2
>> charset_type = utf-8
>> min_prefix_len = 2
>> prefix_fields = matter_name, contact_first_name, contact_last_name,
>> matter_name, contact_first_name, contact_last_name
>> enable_star = 1
>>
>> }
>>
>> source matter_delta_0 : matter_core_0
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre =
>> sql_query = SELECT "matters"."id" * 6 + 0 AS "id" , "matters"."name"
>> AS "matter_name", "users"."first_name" AS "contact_first_name",
>> "users"."last_name" AS "contact_last_name", "matters"."id" AS
>> "sphinx_internal_id", 3077742169 AS "class_crc", '3077742169' AS
>> "subclass_crcs", 0 AS "sphinx_deleted", "matters"."id" AS "id",
>> "matters"."company_id" AS "company_id" FROM "matters" LEFT OUTER
>> JOIN "users" ON "users".id = "matters".employee_user_id WHERE
>> "matters"."id" >= $start AND "matters"."id" <= $end AND
>> "matters"."delta" = TRUE GROUP BY "matters"."id", "matters"."name",
>> "users"."first_name", "users"."last_name", "matters"."id",
>> "matters"."id", "matters"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "matters" WHERE "matters"."delta" = TRUE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "matters" WHERE "id" = (($id - 0) /
>> 6)
>>
>> }
>>
>> source matter_delta_1 : matter_core_1
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre =
>> sql_query = SELECT "matters"."id" * 6 + 0 AS "id" , "matters"."name"
>> AS "matter_name", "users"."first_name" AS "contact_first_name",
>> "users"."last_name" AS "contact_last_name", "matters"."id" AS
>> "sphinx_internal_id", 3077742169 AS "class_crc", '3077742169' AS
>> "subclass_crcs", 0 AS "sphinx_deleted", "matters"."id" AS "id",
>> "matters"."company_id" AS "company_id" FROM "matters" LEFT OUTER
>> JOIN "users" ON "users".id = "matters".employee_user_id WHERE
>> "matters"."id" >= $start AND "matters"."id" <= $end AND
>> "matters"."delta" = TRUE GROUP BY "matters"."id", "matters"."name",
>> "users"."first_name", "users"."last_name", "matters"."id",
>> "matters"."id", "matters"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "matters" WHERE "matters"."delta" = TRUE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "matters" WHERE "id" = (($id - 0) /
>> 6)
>>
>> }
>>
>> index matter_delta : matter_core
>> {
>> source = matter_delta_0
>> source = matter_delta_1
>> path = /home/rahul/application/demo/db/sphinx/development/
>> matter_delta
>>
>> }
>>
>> index matter
>> {
>> type = distributed
>> local = matter_delta
>> local = matter_core
>>
>> }
>>
>> source account_core_0
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre = UPDATE "accounts" SET "delta" = FALSE WHERE "delta"
>> = TRUE
>> sql_query = SELECT "accounts"."id" * 6 + 1 AS "id" ,
>> "accounts"."name" AS "account_name", array_to_string(array_accum
>> (COALESCE("contacts"."first_name", '0')), ' ') AS
>> "contact_first_name", array_to_string(array_accum(COALESCE
>> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
>> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
>> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
>> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
>> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
>> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
>> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
>> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
>> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
>> "accounts"."delta" = FALSE AND accounts.deleted_at is null GROUP BY
>> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
>> "accounts"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = FALSE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 1) /
>> 6)
>>
>> }
>>
>> source account_core_1
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre = UPDATE "accounts" SET "delta" = FALSE WHERE "delta"
>> = TRUE
>> sql_query = SELECT "accounts"."id" * 6 + 1 AS "id" ,
>> "accounts"."name" AS "account_name", array_to_string(array_accum
>> (COALESCE("contacts"."first_name", '0')), ' ') AS
>> "contact_first_name", array_to_string(array_accum(COALESCE
>> ("contacts"."last_name", '0')), ' ') AS "contact_last_name",
>> array_to_string(array_accum(COALESCE("contacts"."email", '0')), ' ')
>> AS "contact_email", "accounts"."id" AS "sphinx_internal_id",
>> 2995482424 AS "class_crc", '2995482424' AS "subclass_crcs", 0 AS
>> "sphinx_deleted", "accounts"."id" AS "id", "accounts"."company_id" AS
>> "company_id" FROM "accounts" LEFT OUTER JOIN "account_contacts" ON
>> ("accounts"."id" = "account_contacts"."account_id") LEFT OUTER JOIN
>> "contacts" ON ("contacts"."id" = "account_contacts"."contact_id")
>> WHERE "accounts"."id" >= $start AND "accounts"."id" <= $end AND
>> "accounts"."delta" = FALSE AND accounts.deleted_at is null GROUP BY
>> "accounts"."id", "accounts"."name", "accounts"."id", "accounts"."id",
>> "accounts"."company_id"
>> sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX
>> ("id"), 1::bigint) FROM "accounts" WHERE "accounts"."delta" = FALSE
>> sql_attr_uint = sphinx_internal_id
>> sql_attr_uint = class_crc
>> sql_attr_uint = sphinx_deleted
>> sql_attr_uint = id
>> sql_attr_uint = company_id
>> sql_attr_multi = uint subclass_crcs from field
>> sql_query_info = SELECT * FROM "accounts" WHERE "id" = (($id - 1) /
>> 6)
>>
>> }
>>
>> index account_core
>> {
>> source = account_core_0
>> source = account_core_1
>> path = /home/rahul/application/demo/db/sphinx/development/
>> account_core
>> morphology = none
>> min_word_len = 2
>> charset_type = utf-8
>> min_prefix_len = 2
>> prefix_fields = account_name, contact_first_name, contact_last_name,
>> contact_email, account_name, contact_first_name, contact_last_name,
>> contact_email
>> enable_star = 1
>>
>> }
>>
>> source account_delta_0 : account_core_0
>> {
>> type = pgsql
>> sql_host = 127.0.0.1
>> sql_user = *****
>> sql_pass = *****
>> sql_db = demo_dev_29122009
>> sql_query_pre =
>> sql_query = SELECT "accounts"."id" * 6 + 1 AS "id" ,
>> "accounts"."name" AS "account_name", array_to_string(array_accum ...
>>
>> read more ยป
>
> --
>
> 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.
>
>
--
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.