Module: SimpleSolrClient
- Defined in:
- lib/simple_solr/schema/field_or_type.rb,
lib/simple_solr.rb,
lib/simple_solr/core.rb,
lib/simple_solr/client.rb,
lib/simple_solr/version.rb,
lib/simple_solr/response/generic_response.rb
Overview
Base class for Field/DynamicField/FieldType
Defined Under Namespace
Modules: Response Classes: Client, Core, Schema
Constant Summary collapse
- ESCAPE_CHARS =
'+-&|!(){}[]^"~*?:\\'
- ESCAPE_MAP =
ESCAPE_CHARS.split(//).each_with_object({}) {|x,h| h[x] = "\\" + x}
- ESCAPE_PAT =
Regexp.new('[' + Regexp.quote(ESCAPE_CHARS) + ']')
- SAMPLE_CORE_DIR =
Where is the sample core configuration?
File.absolute_path File.join(File.dirname(__FILE__), '..', 'solr_sample_core')
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.lucene_escape(str) ⇒ Object
Escape those characters that need escaping to be valid lucene syntax.
Class Method Details
.lucene_escape(str) ⇒ Object
Escape those characters that need escaping to be valid lucene syntax. Is not called internally, since how as I supposed to know if the parens/quotes are a part of your string or there for legal lucene grouping?
11 12 13 |
# File 'lib/simple_solr.rb', line 11 def self.lucene_escape(str) esc = str.to_s.gsub(ESCAPE_PAT, ESCAPE_MAP) end |