Hi Michael

Have a look in the folder where your index files are located on your production 
server - you'll very likely find some temporary files created by Thinking 
Sphinx (to stop indexing of the same files happening concurrently - I guess at 
some point indexing was started then cancelled?)

TS v3.1.2 will make debugging these situations much easier, once it's released.

Cheers

-- 
Pat

On 27 Aug 2014, at 5:29 pm, Michael Kechinov <[email protected]> wrote:

> Hello.
> 
> rails (= 4.1.4)
> thinking-sphinx (3.1.1)
> 
> On localhost (development) command
> rake ts:index
> 
> outputs:
> $ rake ts:index
> Generating configuration to /config/development.sphinx.conf
> Sphinx 2.1.8-release (rel21-r4675)
> Copyright (c) 2001-2014, Andrew Aksyonoff
> Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)
> 
> 
> using config file '/config/development.sphinx.conf'...
> indexing index 'spree_product_core'...
> collected 3587 docs, 0.6 MB
> sorted 1.6 Mhits, 100.0% done
> total 3587 docs, 593368 bytes
> total 0.915 sec, 648182 bytes/sec, 3918.36 docs/sec
> skipping non-plain index 'spree_product'...
> total 3 reads, 0.002 sec, 2415.7 kb/call avg, 0.9 msec/call avg
> total 23 writes, 0.089 sec, 657.2 kb/call avg, 3.9 msec/call avg
> rotating indices: successfully sent SIGHUP to searchd (pid=8888).
> 
> 
> and all products searches well.
> 
> But on production same command
> RAILS_ENV=production bundle exec rake ts:index
> 
> outputs only
> $ RAILS_ENV=production bundle exec rake ts:index
> Generating configuration to 
> /releases/20140826214948/config/production.sphinx.conf
> 
> and new products not found by search request.
> 
> I tried index, rebuild, stop, start. No output about index and no new 
> products in search results. And no errors in output.
> 
> Generated production.sphinx.conf file is:
> $ cat config/production.sphinx.conf 
> 
> 
> indexer
> {
> }
> 
> 
> searchd
> {
>   listen = 127.0.0.1:9306:mysql41
>   log = /shared/log/production.searchd.log
>   query_log = /shared/log/production.searchd.query.log
>   pid_file = /shared/log/production.sphinx.pid
>   workers = threads
>   binlog_path = /releases/20140826214948/tmp/binlog/production
> }
> 
> 
> source spree_product_core_0
> {
>   type = pgsql
>   sql_host = localhost
>   sql_user = grocerymarket
>   sql_pass = g4h709gq38qg
>   sql_db = grocerymarket
>   sql_port = 5432
>   sql_query_pre = SET TIME ZONE UTC
>   sql_query = SELECT "spree_products"."id" * 2 + 0 AS "id", 
> spree_products."name" AS "name", spree_products."description" AS 
> "description", spree_products."id" AS "sphinx_internal_id", 'Spree::Product' 
> AS "sphinx_internal_class", 0 AS "sphinx_deleted", extract(epoch from 
> spree_products."created_at")::int AS "created_at", extract(epoch from 
> spree_products."updated_at")::int AS "updated_at" FROM "spree_products"  
> WHERE ("spree_products"."id" BETWEEN $start AND $end AND deleted_at IS NULL) 
> GROUP BY "spree_products"."id", spree_products."name", 
> spree_products."description", spree_products."id", 
> spree_products."created_at", spree_products."updated_at"
>   sql_query_range = SELECT COALESCE(MIN("spree_products"."id"), 1), 
> COALESCE(MAX("spree_products"."id"), 1) FROM "spree_products"
>   sql_attr_uint = sphinx_internal_id
>   sql_attr_uint = sphinx_deleted
>   sql_attr_timestamp = created_at
>   sql_attr_timestamp = updated_at
>   sql_attr_string = sphinx_internal_class
>   sql_field_string = name
>   sql_query_info = SELECT "spree_products".* FROM "spree_products"  WHERE 
> ("spree_products"."id" = ($id - 0) / 2)
> }
> 
> 
> index spree_product_core
> {
>   type = plain
>   path = /releases/20140826214948/db/sphinx/production/spree_product_core
>   docinfo = extern
>   charset_type = utf-8
>   min_infix_len = 3
>   enable_star = 1
>   source = spree_product_core_0
> }
> 
> 
> index spree_product
> {
>   type = distributed
>   local = spree_product_core
> }
> 
> 
> Any ideas about problem?
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to