Sha256: a09f732a17532608be856257bc10696c2786a355008aa8b94068f4dae6f3c00e

Contents?: true

Size: 276 Bytes

Versions: 7

Compression:

Stored size: 276 Bytes

Contents

require "rsolr"

module Ddr::Index
  class QueryValue

    class << self
      def build(value)
        RSolr.solr_escape(value)
      end

      def or_values(*values)
        value = values.map { |v| build(v) }.join(" OR ")
        "(#{value})"
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.3 lib/ddr/index/query_value.rb
ddr-models-3.0.0.beta.2 lib/ddr/index/query_value.rb
ddr-models-3.0.0.beta.1 lib/ddr/index/query_value.rb
ddr-models-3.0.0.alpha.4 lib/ddr/index/query_value.rb
ddr-models-3.0.0.alpha.3 lib/ddr/index/query_value.rb
ddr-models-3.0.0.alpha.2 lib/ddr/index/query_value.rb
ddr-models-3.0.0.alpha.1 lib/ddr/index/query_value.rb