Getting ERROR: unknown key name ‘docinfo’ on sharetribe installation

691 Views Asked by At

I've been struggling to run bundle exec rake ts:index in my sharetribe project. It's returning an error:

rony@ronyMacMini sharetribe % bundle exec rake ts:index
Generating configuration to /Users/rony/Documents/freelensia Ofc/sharetribe/config/development.sphinx.conf
DEBUG    (1.0ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
DEBUG   ↳ app/indices/custom_field_value_index.rb:8
DEBUG   Delayed::Backend::ActiveRecord::Job Destroy (4.2ms)  DELETE FROM `delayed_jobs` WHERE (handler LIKE ('--- !ruby/object:ThinkingSphinx::Deltas::%') AND locked_at IS NULL AND locked_by IS NULL AND failed_at IS NULL)
DEBUG   ↳ /Users/rony/.rvm/gems/ruby-2.6.5/bin/rake:23
Sphinx 3.3.1 (commit b72d67bc)
Copyright (c) 2001-2020, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/Users/rony/Documents/abc/sharetribe/config/development.sphinx.conf'...
ERROR: unknown key name 'docinfo' in /Users/rony/Documents/abc/sharetribe/config/development.sphinx.conf line 40 col 10.
FATAL: failed to parse config file '/Users/rony/Documents/abc/sharetribe/config/development.sphinx.conf'

The Sphinx indexing command failed:
  Command: indexer --config "/Users/rony/Documents/abc/sharetribe/config/development.sphinx.conf" --all
  Status:  1
  Output:  See above

There may be more information about the failure in /Users/rony/Documents/abc/sharetribe/log/development.searchd.log.

Note that: To install thinking-sphinx on my mac, I’ve downloaded a pre-built set of binaries and copy-pasted content of bin inside usr/local/bin.

Searched everywhere but couldn't found the solution. I'm sure I'm missing some stupid thing.

Please help me to fix it.

Update Downgraded sphinx to 2.2.11. Now another issue raised:

dyld: Library not loaded: /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib
  Referenced from: /usr/local/bin/indexer
  Reason: image not found
zsh: abort      indexer

I think /opt/local is not correct system directory format for mac. :(

1

There are 1 best solutions below

0
On

This is due to recent versions of Sphinx removing the docinfo setting.

Which version of Thinking Sphinx is Sharetribe using? If it's 4.x, you can disable the docinfo settings by adding skip_docinfo: true to each appropriate environment in config/thinking_sphinx.yml. For example:

development:
  skip_docinfo: true

In Thinking Sphinx v5.0, docinfo is no longer used, but upgrading requires a bit of work with adding callbacks to all indexed models.

If you're using Thinking Sphinx v3.x, then you'll need to downgrade your version of Sphinx to v2.2.11.