вторник, 21 июня 2011 г.

Re: thinking sphinx на хостинге

попробуйте ts:rebuild
и еще раз поискать.
если не поможет
ls log | grep searchd
там должны быть логи и пиды ts, можно их глянуть.
и в db/sphinx должна быть папка production
конкретно у меня подозрение, что может напутано быть development/
production

On 21 июн, 11:53, damny <ololonapri...@gmail.com> wrote:
> sphinx.yml я не использую. Я так понимаю, он нужен, для того, чтобы
> точно указать, где находится searchd.pid. И так вроде указывается в
> production.sphinx.conf
>
> $ cat config/production.sphinx.conf
> indexer
> {
>
> }
>
> searchd
> {
>   listen = 127.0.0.1:10323
>   log = /var/www/home/PATH_TO_RAILS_APP/log/searchd.log
>   query_log = /var/www/home/PATH_TO_RAILS_APP/log/searchd.query.log
>   pid_file = /var/www/home/PATH_TO_RAILS_APP/log/
> searchd.production.pid
>
> }
>
> source order_core_0
> {
>   type = pgsql
>   sql_host = postgresql0.locum.ru
>   sql_user = USER
>   sql_pass = PASS
>   sql_db = DB
>   sql_query_pre = SET TIME ZONE 'UTC'
>   sql_query = SELECT "orders"."id" * 2::INT8 + 0 AS "id" ,
> "orders"."name" AS "name", "orders"."address" AS "address",
> "orders"."email" AS "email", "orders"."id" AS "sphinx_internal_id", 0
> AS "sphinx_deleted", 887667868 AS "class_crc" FROM "orders" WHERE
> ("orders"."id" >= $start AND "orders"."id" <= $end) GROUP BY
> "orders"."id", "orders"."name", "orders"."address", "orders"."email",
> "orders"."id"
>   sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint),
> COALESCE(MAX("id"), 1::bigint) FROM "orders"
>   sql_attr_uint = sphinx_internal_id
>   sql_attr_uint = sphinx_deleted
>   sql_attr_uint = class_crc
>   sql_query_info = SELECT * FROM "orders" WHERE "id" = (($id - 0) / 2)
>
> }
>
> index order_core
> {
>   source = order_core_0
>   path = /var/www/home/PATH_TO_RAILS_APP/db/sphinx/production/
> order_core
>   charset_type = utf-8
>
> }
>
> index order
> {
>   type = distributed
>   local = order_core
>
> }
>
> source product_core_0
> {
>   type = pgsql
>   sql_host = postgresql0.locum.ru
>   sql_user = USER
>   sql_pass = PASS
>   sql_db = DB
>   sql_query_pre = SET TIME ZONE 'UTC'
>   sql_query = SELECT "products"."id" * 2::INT8 + 1 AS "id" ,
> "products"."title" AS "title", "products"."producer" AS "producer",
> "products"."model" AS "model", "products"."id" AS
> "sphinx_internal_id", 0 AS "sphinx_deleted", 485965105 AS "class_crc"
> FROM "products" WHERE ("products"."id" >= $start AND "products"."id"
> <= $end) GROUP BY "products"."id", "products"."title",
> "products"."producer", "products"."model", "products"."id"
>   sql_query_range = SELECT COALESCE(MIN("id"), 1::bigint),
> COALESCE(MAX("id"), 1::bigint) FROM "products"
>   sql_attr_uint = sphinx_internal_id
>   sql_attr_uint = sphinx_deleted
>   sql_attr_uint = class_crc
>   sql_query_info = SELECT * FROM "products" WHERE "id" = (($id - 1) /
> 2)
>
> }
>
> index product_core
> {
>   source = product_core_0
>   path = /var/www/home/PATH_TO_RAILS_APP/db/sphinx/production/
> product_core
>   charset_type = utf-8
>
> }
>
> index product
> {
>   type = distributed
>   local = product_core
>
> }
>
> --------------
> $ bundle
> Using rake (0.9.2)
> Using abstract (1.0.0)
> Using activesupport (3.0.3)
> Using builder (2.1.2)
> Using i18n (0.6.0)
> Using activemodel (3.0.3)
> Using erubis (2.6.6)
> Using rack (1.2.3)
> Using rack-mount (0.6.14)
> Using rack-test (0.5.7)
> Using tzinfo (0.3.28)
> Using actionpack (3.0.3)
> Using mime-types (1.16)
> Using polyglot (0.3.1)
> Using treetop (1.4.9)
> Using mail (2.2.19)
> Using actionmailer (3.0.3)
> Using arel (2.0.10)
> Using activerecord (3.0.3)
> Using activeresource (3.0.3)
> Using bcrypt-ruby (2.1.4)
> Using bundler (1.0.10)
> Using cancan (1.6.5)
> Using cocaine (0.1.0)
> Using orm_adapter (0.0.5)
> Using warden (1.0.4)
> Using devise (1.3.4)
> Using thor (0.14.6)
> Using railties (3.0.3)
> Using jquery-rails (1.0.11)
> Using kgio (2.4.2)
> Using paperclip (2.3.10) from git://github.com/thoughtbot/paperclip.git
> (at master)
> Using pg (0.11.0)
> Using rails (3.0.3)
> Using riddle (1.3.3)
> Using thinking-sphinx (2.0.5)
> Using unicorn (3.7.0)
> Using will_paginate (3.0.pre2)
> Your bundle is complete! It was installed into /home/hosting_svopart/
>
> и да, после rake ts:index RAILS_ENV=productionts я запускаю командой
> rake ts:start RAILS_ENV=productionts, предварительно порт сменив в
> production.sphinx.conf
>
> On 21 июн, 06:28, Лев Черемухин <nir0pi...@gmail.com> wrote:
>
>
>
>
>
>
>
> > нужно больше данных.
> > cat config/sphinx.yml
> > cat config/production.sphinx.conf
> > bundle
>
> > On 21 июн, 00:03, damny <ololonapri...@gmail.com> wrote:
>
> > > > Product.search('hp')
>
> > > ThinkingSphinx::SphinxError: unknown local index 'product_core' in
> > > search request
> > > и дальше пути, в каком gem-е ошибка
>
> > > Почему такая ошибка, когда индексы создаю же?

--
--
Данное сообщение отправлено Вам, так как Вы являетесь подписчиком группы "RubyOnRails to russian" на группах Google.
FAQ группы находится по адресу: http://ru.wikibooks.org/wiki/RubyFAQ

Для того, чтобы отправить сообщение в эту группу, пошлите его по адресу
ror2ru@googlegroups.com
Чтобы отменить подписку на эту группу, отправьте сообщение по адресу: ror2ru-unsubscribe@googlegroups.com
Дополнительные варианты находятся на странице группы http://groups.google.com/group/ror2ru?hl=ru

Комментариев нет:

Отправить комментарий