Sha256: 470b2e5feef11fddeae86c8eb0c438e8e7392a34bbd873e573a497052115fb5b

Contents?: true

Size: 325 Bytes

Versions: 4

Compression:

Stored size: 325 Bytes

Contents

# Figure out how to match a field name to a copyfield/dynamicfield
class SimpleSolrClient::Schema
  module Matcher
    def derive_matcher(src)
      if src =~ /\A\*(.*)/
        Regexp.new("\\A(.*)(#{Regexp.escape($1)})\\Z")
      else
        src
      end
    end

    def matches(s)
      @matcher === s
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple_solr_client-0.2.0 lib/simple_solr_client/schema/matcher.rb
simple_solr_client-0.1.2 lib/simple_solr_client/schema/matcher.rb
simple_solr_client-0.1.1 lib/simple_solr/schema/matcher.rb
simple_solr_client-0.1.0 lib/simple_solr/schema/matcher.rb