Module: Sphinx

Includes:
Constants
Defined in:
lib/sphinx.rb,
lib/sphinx/client.rb,
lib/sphinx/timeout.rb,
lib/sphinx/version.rb,
lib/sphinx/request.rb,
lib/sphinx/response.rb,
lib/sphinx/constants.rb,
lib/sphinx/indifferent_access.rb

Overview

Sphinx Client API

Author

Dmytro Shteflyuk <kpumuk@kpumuk.info>.

Copyright

Copyright © 2006 — 2013 Dmytro Shteflyuk

License

Distributes under the same terms as Ruby

Version

2.1.1.3712

Website

kpumuk.info/projects/ror-plugins/sphinx

Sources

github.com/kpumuk/sphinx

This library is distributed under the terms of the Ruby license. You can freely distribute/modify this library.

Defined Under Namespace

Modules: Constants Classes: BufferedIO, Client, Request, Response, Server, SphinxConnectError, SphinxError, SphinxInternalError, SphinxResponseError, SphinxTemporaryError, SphinxUnknownError

Constant Summary

VERSION =
'2.1.1.3712'

Constants included from Constants

Constants::QUERY_FLAGS, Constants::SEARCHD_COMMAND_EXCERPT, Constants::SEARCHD_COMMAND_FLUSHATTRS, Constants::SEARCHD_COMMAND_KEYWORDS, Constants::SEARCHD_COMMAND_PERSIST, Constants::SEARCHD_COMMAND_SEARCH, Constants::SEARCHD_COMMAND_STATUS, Constants::SEARCHD_COMMAND_UPDATE, Constants::SEARCHD_ERROR, Constants::SEARCHD_OK, Constants::SEARCHD_RETRY, Constants::SEARCHD_WARNING, Constants::SPH_ATTR_BIGINT, Constants::SPH_ATTR_BOOL, Constants::SPH_ATTR_FACTORS, Constants::SPH_ATTR_FLOAT, Constants::SPH_ATTR_INTEGER, Constants::SPH_ATTR_MULTI, Constants::SPH_ATTR_MULTI64, Constants::SPH_ATTR_ORDINAL, Constants::SPH_ATTR_STRING, Constants::SPH_ATTR_TIMESTAMP, Constants::SPH_FILTER_FLOATRANGE, Constants::SPH_FILTER_RANGE, Constants::SPH_FILTER_VALUES, Constants::SPH_GROUPBY_ATTR, Constants::SPH_GROUPBY_ATTRPAIR, Constants::SPH_GROUPBY_DAY, Constants::SPH_GROUPBY_MONTH, Constants::SPH_GROUPBY_WEEK, Constants::SPH_GROUPBY_YEAR, Constants::SPH_MATCH_ALL, Constants::SPH_MATCH_ANY, Constants::SPH_MATCH_BOOLEAN, Constants::SPH_MATCH_EXTENDED, Constants::SPH_MATCH_EXTENDED2, Constants::SPH_MATCH_FULLSCAN, Constants::SPH_MATCH_PHRASE, Constants::SPH_RANK_BM25, Constants::SPH_RANK_EXPR, Constants::SPH_RANK_FIELDMASK, Constants::SPH_RANK_MATCHANY, Constants::SPH_RANK_NONE, Constants::SPH_RANK_PROXIMITY, Constants::SPH_RANK_PROXIMITY_BM25, Constants::SPH_RANK_SPH04, Constants::SPH_RANK_WORDCOUNT, Constants::SPH_SORT_ATTR_ASC, Constants::SPH_SORT_ATTR_DESC, Constants::SPH_SORT_EXPR, Constants::SPH_SORT_EXTENDED, Constants::SPH_SORT_RELEVANCE, Constants::SPH_SORT_TIME_SEGMENTS, Constants::VER_COMMAND_EXCERPT, Constants::VER_COMMAND_FLUSHATTRS, Constants::VER_COMMAND_KEYWORDS, Constants::VER_COMMAND_PERSIST, Constants::VER_COMMAND_QUERY, Constants::VER_COMMAND_SEARCH, Constants::VER_COMMAND_STATUS, Constants::VER_COMMAND_UPDATE

Class Method Summary (collapse)

Class Method Details

+ (Object) safe_execute(timeout = 5, &block)

Executes specified block respecting timeout passed.



23
24
25
26
27
28
29
# File 'lib/sphinx/timeout.rb', line 23

def self.safe_execute(timeout = 5, &block)
  if timeout > 0
    Sphinx::Timeout.timeout(timeout, &block)
  else
    yield
  end
end