Let me preface this by first stating that I have an application that
has user data in separate database.  Each user has his own database.
So I have hacked TS in it's configure and search code to generate
index configs for each user.

Having said that, running the ts:in task, which apparently just runs
config and the Sphinx indexer, I get index files that look like this:


** Note, that "14014" is our user's account number, which specifies
the db being indexed.

-rw-r--r--   1 root  admin       791 Apr 11 21:40
14014_product_core.new.spp
-rw-r--r--   1 root  admin      4740 Apr 11 21:40
14014_product_core.new.spm
-rw-r--r--   1 root  admin      2709 Apr 11 21:40
14014_product_core.new.spi
-rw-r--r--   1 root  admin       325 Apr 11 21:40
14014_product_core.new.sph
-rw-r--r--   1 root  admin      2673 Apr 11 21:40
14014_product_core.new.spd
-rw-r--r--   1 root  admin     12640 Apr 11 21:40
14014_product_core.new.spa

Where is that ".new" coming from?

And of course when I run ts:start, it complains that it can't find the
indexes in the config file.  Here's the config:

source 14014_product_core_0
{
  type = mysql
  sql_host = localhost
  sql_user = root
  sql_pass = iware1pr
  sql_db = c14014
  sql_port = 3306
  sql_query_pre = SET NAMES utf8
  sql_query = SELECT `products`.`id` * 5 + 3 AS `id` , CAST
(`products`.`part_number` AS CHAR) AS `part_number`, IFNULL
(`products`.`part_number`, '') AS `part_number_sort`, UNIX_TIMESTAMP
(`products`.`created_at`) AS `created_at`, UNIX_TIMESTAMP
(`products`.`updated_at`) AS `updated_at`, `products`.`id` AS
`sphinx_internal_id`, 485965105 AS `class_crc`, '485965105' AS
`subclass_crcs`, 0 AS `sphinx_deleted` FROM products    WHERE
`products`.`id` >= $start   AND `products`.`id` <= $end    GROUP BY
`products`.`id`  ORDER BY NULL
  sql_query_range = SELECT IFNULL(MIN(`id`), 1), IFNULL(MAX(`id`), 1)
FROM `products`
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = class_crc
  sql_attr_uint = sphinx_deleted
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_str2ordinal = part_number_sort
  sql_attr_multi = uint subclass_crcs from field
  sql_query_info = SELECT * FROM `products` WHERE  `id` = (($id - 3) /
5)
}

index 14014_product_core
{
  source = 14014_product_core_0
  path = /home/sphinx/sphinx/development/14014_product_core
  morphology = stem_en
  charset_type = utf-8
}

index 14014_product
{
  type = distributed
  local = 14014_product_core
}

Here's the crazy thing though.  If I run config for just ONE account,
the index file names are generated correctly.
--~--~---------~--~----~------------~-------~--~----~
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