Sha256: d789923c4f035951e0ba8f3d1f767902307ea56a4cc9078ded09cd5705bd43af

Contents?: true

Size: 494 Bytes

Versions: 46

Compression:

Stored size: 494 Bytes

Contents

module Picky

  module Backends

    # Naive implementation of a file-based index.
    # In-Memory Hash with length, offset:
    #   { :bla => [20, 312] }
    # That map to positions the File, encoded in JSON:
    #   ...[1,2,3,21,7,4,13,15]...
    #
    class File < Backend
      
      def create_weights bundle
        Memory::JSON.new bundle.index_path(:weights)
      end
      
      def create_similarity bundle
        json bundle.index_path(:similarity)
      end

    end

  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
picky-4.19.5 lib/picky/backends/file.rb
picky-4.19.4 lib/picky/backends/file.rb
picky-4.19.3 lib/picky/backends/file.rb
picky-4.19.2 lib/picky/backends/file.rb
picky-4.19.1 lib/picky/backends/file.rb
picky-4.19.0 lib/picky/backends/file.rb
picky-4.18.0 lib/picky/backends/file.rb
picky-4.17.1 lib/picky/backends/file.rb
picky-4.17.0 lib/picky/backends/file.rb
picky-4.16.0 lib/picky/backends/file.rb
picky-4.15.1 lib/picky/backends/file.rb
picky-4.15.0 lib/picky/backends/file.rb
picky-4.14.0 lib/picky/backends/file.rb
picky-4.13.1 lib/picky/backends/file.rb
picky-4.13.0 lib/picky/backends/file.rb
picky-4.12.13 lib/picky/backends/file.rb
picky-4.12.12 lib/picky/backends/file.rb
picky-4.12.11 lib/picky/backends/file.rb
picky-4.12.10 lib/picky/backends/file.rb
picky-4.12.8 lib/picky/backends/file.rb