tantiny-in-memory 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c209016dc2484903b6d27851d551a6e1f71a4bbc52ed54bc5b46f0bd567842d
4
- data.tar.gz: 4586683870e8036ae55c09c5971807e0b870fe9bd9712aa98172f4d5ea72a502
3
+ metadata.gz: 577d79387dc5197ff36159562f26fa1f199afdbf7633efa6386c85df977d3f10
4
+ data.tar.gz: e09fdfe75226128d81b38cd149baaf2f8db5350573d672d13e308618a74ff817
5
5
  SHA512:
6
- metadata.gz: 42d3d96336441ed0c4ef5fae15e7b52a1b26e8e241700c3079e7ebbe4063b4774b7071d924610b278a78e01b3c002abbfd6aa6e7beb8edc1b623a27bfb7f9a15
7
- data.tar.gz: c1dbaf41a82cf7ddf9c5213def71bec96bdf9cf98231c2c6cf85e0ca78fc9164e5dcf88bc59bfbc2625df23ce92cf9aca4a5fa4fa877759ed4a6a5ade209fa17
6
+ metadata.gz: 950ee4f1e27526e13a9fdef3d4b3ee1b48020907edc0020cd99cbe5440250d9b64014483c6d46cc2ff946bae28ba8384e907fe620de873a373bb5c644e62d62e
7
+ data.tar.gz: 5a90ca010746ea830cd76c029681e98b825dfa5a01141a4d949cccb703d2f565c9cff3925a45e79256d5bff45223e6c905022705e6549dc6311f770936a9020a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.1](https://github.com/a-chris/tantiny-in-memory/compare/v1.0.0...v1.0.1) (2023-09-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * gemspec ([5adaaa4](https://github.com/a-chris/tantiny-in-memory/commit/5adaaa4c5c01ff78ec957ef8be2d13a2779dbcc1))
9
+ * reset changelog ([61834f1](https://github.com/a-chris/tantiny-in-memory/commit/61834f1b50c6cee30884e72cef365a81548811a9))
10
+
3
11
  ## 1.0.0 (2023-09-04)
4
12
 
5
13
  ### Features
data/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "tantiny"
3
- version = "1.0.0" # {x-release-please-version}
3
+ version = "1.0.1" # {x-release-please-version}
4
4
  edition = "2021"
5
5
  authors = ["Alexander Baygeldin"]
6
6
  repository = "https://github.com/baygeldin/tantiny"
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tantiny
4
+ class Schema
5
+ attr_reader :default_tokenizer,
6
+ :id_field,
7
+ :text_fields,
8
+ :string_fields,
9
+ :integer_fields,
10
+ :double_fields,
11
+ :date_fields,
12
+ :facet_fields,
13
+ :field_tokenizers
14
+
15
+ def initialize(tokenizer, &block)
16
+ @default_tokenizer = tokenizer
17
+ @id_field = :id
18
+ @text_fields = []
19
+ @string_fields = []
20
+ @integer_fields = []
21
+ @double_fields = []
22
+ @date_fields = []
23
+ @facet_fields = []
24
+ @field_tokenizers = {}
25
+
26
+ instance_exec(&block)
27
+ end
28
+
29
+ def tokenizer_for(field)
30
+ field_tokenizers[field] || default_tokenizer
31
+ end
32
+
33
+ private
34
+
35
+ def id(key) ; @id_field = key; end
36
+
37
+ def string(key) ; @string_fields << key; end
38
+
39
+ def integer(key) ; @integer_fields << key; end
40
+
41
+ def double(key) ; @double_fields << key; end
42
+
43
+ def date(key) ; @date_fields << key; end
44
+
45
+ def facet(key) ; @facet_fields << key; end
46
+
47
+ def text(key, tokenizer: nil)
48
+ @field_tokenizers[key] = tokenizer if tokenizer
49
+
50
+ @text_fields << key
51
+ end
52
+ end
53
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tantiny
4
- VERSION = "1.0.0" # {x-release-please-version}
4
+ VERSION = "1.0.1" # {x-release-please-version}
5
5
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tantiny-in-memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Toscano
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2023-09-04 00:00:00.000000000 Z
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
- description:
83
+ description:
84
84
  email:
85
85
  - a.christian.toscano@gmail.com
86
86
  executables: []
@@ -95,8 +95,8 @@ files:
95
95
  - bin/console
96
96
  - bin/setup
97
97
  - ext/Rakefile
98
+ - lib/.rbnext/3.0/tantiny/schema.rb
98
99
  - lib/tantiny.rb
99
- - lib/tantiny.so
100
100
  - lib/tantiny/errors.rb
101
101
  - lib/tantiny/helpers.rb
102
102
  - lib/tantiny/index.rb
@@ -126,7 +126,7 @@ metadata:
126
126
  documentation_uri: https://github.com/a-chris/tantiny-in-memory/blob/master/README.md
127
127
  homepage_uri: https://github.com/a-chris/tantiny-in-memory
128
128
  source_code_uri: https://github.com/a-chris/tantiny-in-memory
129
- post_install_message:
129
+ post_install_message:
130
130
  rdoc_options: []
131
131
  require_paths:
132
132
  - lib
@@ -141,8 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.4.10
145
- signing_key:
144
+ rubygems_version: 3.3.26
145
+ signing_key:
146
146
  specification_version: 4
147
147
  summary: Tiny full-text search for Ruby powered by Tantivy but in memory!
148
148
  test_files: []
data/lib/tantiny.so DELETED
Binary file