Skip to content

Instantly share code, notes, and snippets.

@the-teacher
Last active July 26, 2019 10:34
Show Gist options
  • Save the-teacher/7e0a518ec6b68ff2a44f66617b722142 to your computer and use it in GitHub Desktop.
Save the-teacher/7e0a518ec6b68ff2a44f66617b722142 to your computer and use it in GitHub Desktop.
$ rake ts:configure


/Users/the-teacher/.rvm/gems/[email protected]/gems/compass-core-1.0.1/lib/compass/core/caniuse.rb:72: warning: circular argument reference - browsers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TheComments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING!
StateMachine patch for Rails4 will be applied

> private method *around_validation* from StateMachine::Integrations::ActiveModel will be public

https://github.com/pluginaweek/state_machine/issues/295
https://github.com/pluginaweek/state_machine/issues/251
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Settings: /Volumes/Data/my/OPEN-COOK/open-cook.ru/config/ENV/development/settings/main.yml
Redis: will try to init on port: 6010!
Sidekiq: will try to connect to Redis on port: 6010
Generating configuration to /Volumes/Data/my/OPEN-COOK/open-cook.ru/config/SPHINX.config
indexer
{
}

searchd
{
  listen = localhost:9156:mysql41
  log = /Volumes/Data/my/OPEN-COOK/open-cook.ru/log/searchd.development.log
  query_log = /Volumes/Data/my/OPEN-COOK/open-cook.ru/log/searchd.development.query.log
  pid_file = /Volumes/Data/my/OPEN-COOK/open-cook.ru/tmp/searchd.development.pid
  workers = threads
  binlog_path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/binlog/development
}

source blog_core_0
{
  type = pgsql
  sql_host = localhost
  sql_user = the-teacher
  sql_pass = qwerty
  sql_db = open_cook_dev
  sql_query_pre = SET TIME ZONE UTC
  sql_query = SELECT "blogs"."id" * 10 + 0 AS "id", "blogs"."title" AS "title", "blogs"."intro" AS "intro", "blogs"."content" AS "content", "blogs"."id" AS "sphinx_internal_id", 'Blog' AS "sphinx_internal_class", 0 AS "sphinx_deleted", "blogs"."user_id" AS "user_id", "blogs"."hub_id" AS "hub_id", extract(epoch from "blogs"."published_at")::int AS "published_at", extract(epoch from "blogs"."created_at")::int AS "created_at", extract(epoch from "blogs"."updated_at")::int AS "updated_at" FROM "blogs" WHERE ("blogs"."id" BETWEEN $start AND $end AND state = 'published') GROUP BY "blogs"."id", "blogs"."title", "blogs"."intro", "blogs"."content", "blogs"."id", "blogs"."user_id", "blogs"."hub_id", "blogs"."published_at", "blogs"."created_at", "blogs"."updated_at"
  sql_query_range = SELECT COALESCE(MIN("blogs"."id"), 1), COALESCE(MAX("blogs"."id"), 1) FROM "blogs"
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = sphinx_deleted
  sql_attr_uint = user_id
  sql_attr_uint = hub_id
  sql_attr_timestamp = published_at
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_string = sphinx_internal_class
}

index blog_core
{
  type = plain
  path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/db/SPHINX/blog_core
  docinfo = extern
  morphology = stem_en, stem_ru
  min_infix_len = 3
  source = blog_core_0
}

source interview_core_0
{
  type = pgsql
  sql_host = localhost
  sql_user = the-teacher
  sql_pass = qwerty
  sql_db = open_cook_dev
  sql_query_pre = SET TIME ZONE UTC
  sql_query = SELECT "interviews"."id" * 10 + 1 AS "id", "interviews"."title" AS "title", "interviews"."intro" AS "intro", "interviews"."content" AS "content", "interviews"."id" AS "sphinx_internal_id", 'Interview' AS "sphinx_internal_class", 0 AS "sphinx_deleted", "interviews"."user_id" AS "user_id", "interviews"."hub_id" AS "hub_id", extract(epoch from "interviews"."published_at")::int AS "published_at", extract(epoch from "interviews"."created_at")::int AS "created_at", extract(epoch from "interviews"."updated_at")::int AS "updated_at" FROM "interviews" WHERE ("interviews"."id" BETWEEN $start AND $end AND state = 'published') GROUP BY "interviews"."id", "interviews"."title", "interviews"."intro", "interviews"."content", "interviews"."id", "interviews"."user_id", "interviews"."hub_id", "interviews"."published_at", "interviews"."created_at", "interviews"."updated_at"
  sql_query_range = SELECT COALESCE(MIN("interviews"."id"), 1), COALESCE(MAX("interviews"."id"), 1) FROM "interviews"
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = sphinx_deleted
  sql_attr_uint = user_id
  sql_attr_uint = hub_id
  sql_attr_timestamp = published_at
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_string = sphinx_internal_class
}

index interview_core
{
  type = plain
  path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/db/SPHINX/interview_core
  docinfo = extern
  morphology = stem_en, stem_ru
  min_infix_len = 3
  source = interview_core_0
}

source page_core_0
{
  type = pgsql
  sql_host = localhost
  sql_user = the-teacher
  sql_pass = qwerty
  sql_db = open_cook_dev
  sql_query_pre = SET TIME ZONE UTC
  sql_query = SELECT "pages"."id" * 10 + 2 AS "id", "pages"."title" AS "title", "pages"."intro" AS "intro", "pages"."content" AS "content", "pages"."id" AS "sphinx_internal_id", 'Page' AS "sphinx_internal_class", 0 AS "sphinx_deleted", "pages"."user_id" AS "user_id", "pages"."hub_id" AS "hub_id", extract(epoch from "pages"."published_at")::int AS "published_at", extract(epoch from "pages"."created_at")::int AS "created_at", extract(epoch from "pages"."updated_at")::int AS "updated_at" FROM "pages" WHERE ("pages"."id" BETWEEN $start AND $end AND state = 'published') GROUP BY "pages"."id", "pages"."title", "pages"."intro", "pages"."content", "pages"."id", "pages"."user_id", "pages"."hub_id", "pages"."published_at", "pages"."created_at", "pages"."updated_at"
  sql_query_range = SELECT COALESCE(MIN("pages"."id"), 1), COALESCE(MAX("pages"."id"), 1) FROM "pages"
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = sphinx_deleted
  sql_attr_uint = user_id
  sql_attr_uint = hub_id
  sql_attr_timestamp = published_at
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_string = sphinx_internal_class
}

index page_core
{
  type = plain
  path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/db/SPHINX/page_core
  docinfo = extern
  morphology = stem_en, stem_ru
  min_infix_len = 3
  source = page_core_0
}

source post_core_0
{
  type = pgsql
  sql_host = localhost
  sql_user = the-teacher
  sql_pass = qwerty
  sql_db = open_cook_dev
  sql_query_pre = SET TIME ZONE UTC
  sql_query = SELECT "posts"."id" * 10 + 3 AS "id", "posts"."title" AS "title", "posts"."intro" AS "intro", "posts"."content" AS "content", "posts"."id" AS "sphinx_internal_id", 'Post' AS "sphinx_internal_class", 0 AS "sphinx_deleted", "posts"."user_id" AS "user_id", "posts"."hub_id" AS "hub_id", extract(epoch from "posts"."published_at")::int AS "published_at", extract(epoch from "posts"."created_at")::int AS "created_at", extract(epoch from "posts"."updated_at")::int AS "updated_at" FROM "posts" WHERE ("posts"."id" BETWEEN $start AND $end AND state = 'published') GROUP BY "posts"."id", "posts"."title", "posts"."intro", "posts"."content", "posts"."id", "posts"."user_id", "posts"."hub_id", "posts"."published_at", "posts"."created_at", "posts"."updated_at"
  sql_query_range = SELECT COALESCE(MIN("posts"."id"), 1), COALESCE(MAX("posts"."id"), 1) FROM "posts"
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = sphinx_deleted
  sql_attr_uint = user_id
  sql_attr_uint = hub_id
  sql_attr_timestamp = published_at
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_string = sphinx_internal_class
}

index post_core
{
  type = plain
  path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/db/SPHINX/post_core
  docinfo = extern
  morphology = stem_en, stem_ru
  min_infix_len = 3
  source = post_core_0
}

source recipe_core_0
{
  type = pgsql
  sql_host = localhost
  sql_user = the-teacher
  sql_pass = qwerty
  sql_db = open_cook_dev
  sql_query_pre = SET TIME ZONE UTC
  sql_query = SELECT "recipes"."id" * 10 + 4 AS "id", "recipes"."title" AS "title", "recipes"."intro" AS "intro", "recipes"."content" AS "content", "recipes"."id" AS "sphinx_internal_id", 'Recipe' AS "sphinx_internal_class", 0 AS "sphinx_deleted", "recipes"."user_id" AS "user_id", "recipes"."hub_id" AS "hub_id", extract(epoch from "recipes"."published_at")::int AS "published_at", extract(epoch from "recipes"."created_at")::int AS "created_at", extract(epoch from "recipes"."updated_at")::int AS "updated_at" FROM "recipes" WHERE ("recipes"."id" BETWEEN $start AND $end AND state = 'published') GROUP BY "recipes"."id", "recipes"."title", "recipes"."intro", "recipes"."content", "recipes"."id", "recipes"."user_id", "recipes"."hub_id", "recipes"."published_at", "recipes"."created_at", "recipes"."updated_at"
  sql_query_range = SELECT COALESCE(MIN("recipes"."id"), 1), COALESCE(MAX("recipes"."id"), 1) FROM "recipes"
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = sphinx_deleted
  sql_attr_uint = user_id
  sql_attr_uint = hub_id
  sql_attr_timestamp = published_at
  sql_attr_timestamp = created_at
  sql_attr_timestamp = updated_at
  sql_attr_string = sphinx_internal_class
}

index recipe_core
{
  type = plain
  path = /Volumes/Data/my/OPEN-COOK/open-cook.ru/db/SPHINX/recipe_core
  docinfo = extern
  morphology = stem_en, stem_ru
  min_infix_len = 3
  source = recipe_core_0
}

index blog
{
  type = distributed
  local = blog_core
}

index interview
{
  type = distributed
  local = interview_core
}

index page
{
  type = distributed
  local = page_core
}

index post
{
  type = distributed
  local = post_core
}

index recipe
{
  type = distributed
  local = recipe_core
}
@the-teacher
Copy link
Author

$ rake ts:index

Generating configuration to /Volumes/Data/my/OPEN-COOK/open-cook.ru/config/SPHINX.config
Sphinx 2.2.11-id64-release (95ae9a6)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/Volumes/Data/my/OPEN-COOK/open-cook.ru/config/SPHINX.config'...
indexing index 'blog_core'...
WARNING: index 'blog_core': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
collected 4 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 4 docs, 28062 bytes
total 0.089 sec, 311851 bytes/sec, 44.45 docs/sec
indexing index 'interview_core'...
WARNING: index 'interview_core': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
collected 8 docs, 0.2 MB
sorted 0.0 Mhits, 100.0% done
total 8 docs, 164491 bytes
total 0.102 sec, 1600371 bytes/sec, 77.83 docs/sec
indexing index 'page_core'...
WARNING: index 'page_core': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
collected 14 docs, 0.1 MB
sorted 0.0 Mhits, 100.0% done
total 14 docs, 119272 bytes
total 0.094 sec, 1261163 bytes/sec, 148.03 docs/sec
indexing index 'post_core'...
WARNING: index 'post_core': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
collected 68 docs, 0.9 MB
sorted 0.2 Mhits, 100.0% done
total 68 docs, 867261 bytes
total 0.289 sec, 2995482 bytes/sec, 234.86 docs/sec
indexing index 'recipe_core'...
WARNING: index 'recipe_core': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
collected 635 docs, 3.7 MB
sorted 0.8 Mhits, 100.0% done
total 635 docs, 3699050 bytes
total 0.552 sec, 6691624 bytes/sec, 1148.72 docs/sec
skipping non-plain index 'blog'...
skipping non-plain index 'interview'...
skipping non-plain index 'page'...
skipping non-plain index 'post'...
skipping non-plain index 'recipe'...
total 759 reads, 0.004 sec, 7.2 kb/call avg, 0.0 msec/call avg
total 72 writes, 0.005 sec, 151.3 kb/call avg, 0.0 msec/call avg

@the-teacher
Copy link
Author

$ mysql -V
mysql Ver 8.0.16 for osx10.14 on x86_64 (Homebrew)

$ psql -V
psql (PostgreSQL) 11.2

$ searchd -V
Sphinx 2.2.11-id64-release (95ae9a6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment