isomorfeus-ferret 0.13.2 → 0.13.3
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 +4 -4
- data/README.md +6 -5
- data/ext/isomorfeus_ferret_ext/frb_index.c +10 -15
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958c051fa7f771e25ee1fb29c47aad9ab1cd7a570750f73450ae582474ef6fb5
|
4
|
+
data.tar.gz: beba6b22ba7493f324be38997fee4f4a56efc896281fcbb2f3521ebef6795029
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98bef5c79e3d4e8854d6a4cb68e2cb796c6f27bbaf1c7b7669ab895e8656d12d033651f8d8b29ac8d7504b46dba7567aa52f2ac297285ff2c6c62e52c48d0019
|
7
|
+
data.tar.gz: 165497f356ab32cdc6250b3eada43d9ec36d61ee992114bffa9c38372c7894455caeb95aa789cf025c2538c7f9e1eddafe87e66b58536424a4c8e116a123af88
|
data/README.md
CHANGED
@@ -26,7 +26,7 @@ It should work on *nixes, *nuxes, *BSDs and also works on Windows.
|
|
26
26
|
- The :store option no longer accepts :compress, compression must now be specified by the separate :compress options (see below).
|
27
27
|
- The ASCII-specific Tokenizers and Analyzers have been removed
|
28
28
|
|
29
|
-
###
|
29
|
+
### String Encoding support
|
30
30
|
|
31
31
|
#### Input strings and stored fields
|
32
32
|
|
@@ -37,12 +37,13 @@ All Ruby string encodings are supported.
|
|
37
37
|
When fields are stored, they are now stored with the encoding, so that when they are retrieved again, they
|
38
38
|
retain the original encoding with positions matching the string in its original encoding.
|
39
39
|
|
40
|
-
#### Tokens and
|
40
|
+
#### Tokens, Terms, Filters and Queries
|
41
41
|
|
42
42
|
Tokens are internally converted to UTF-8, which may change their length compared to their original encoding,
|
43
|
-
yet they retain position information according to the source in its original encoding.
|
44
|
-
|
45
|
-
|
43
|
+
yet they retain position information according to the source in its original encoding. Terms are likewise stored in UTF-8 encoding.
|
44
|
+
Queries are converted to UTF-8 encoding too.
|
45
|
+
The benefit is, that Filters, Stemmers or anything else working with Tokens and Terms only needs to support UTF-8 encoding,
|
46
|
+
greatly simplifying things and ensuring consistent query results, independent of source encoding.
|
46
47
|
|
47
48
|
### Compression
|
48
49
|
|
@@ -182,8 +182,9 @@ static VALUE frb_get_field_info(FrtFieldInfo *fi) {
|
|
182
182
|
fi->rfi = TypedData_Wrap_Struct(cFieldInfo, &frb_field_info_t, fi);
|
183
183
|
FRT_REF(fi);
|
184
184
|
}
|
185
|
+
return fi->rfi;
|
185
186
|
}
|
186
|
-
return
|
187
|
+
return Qnil;
|
187
188
|
}
|
188
189
|
|
189
190
|
/*
|
@@ -412,8 +413,9 @@ static VALUE frb_get_field_infos(FrtFieldInfos *fis) {
|
|
412
413
|
fis->rfis = TypedData_Wrap_Struct(cFieldInfos, &frb_field_infos_t, fis);
|
413
414
|
FRT_REF(fis);
|
414
415
|
}
|
416
|
+
return fis->rfis;
|
415
417
|
}
|
416
|
-
return
|
418
|
+
return Qnil;
|
417
419
|
}
|
418
420
|
|
419
421
|
/*
|
@@ -497,11 +499,6 @@ static VALUE frb_fis_get(VALUE self, VALUE ridx) {
|
|
497
499
|
case T_STRING:
|
498
500
|
rfi = frb_get_field_info(frt_fis_get_field(fis, frb_field(ridx)));
|
499
501
|
break;
|
500
|
-
/*
|
501
|
-
case T_STRING:
|
502
|
-
rfi = frb_get_field_info(frt_fis_get_field(fis, StringValuePtr(ridx)));
|
503
|
-
break;
|
504
|
-
*/
|
505
502
|
default:
|
506
503
|
rb_raise(rb_eArgError, "Can't index FieldInfos with %s",
|
507
504
|
rs2s(rb_obj_as_string(ridx)));
|
@@ -1699,10 +1696,9 @@ frb_iw_delete(VALUE self, VALUE rfield, VALUE rterm)
|
|
1699
1696
|
* Get the FieldInfos object for this FrtIndexWriter. This is useful if you need
|
1700
1697
|
* to dynamically add new fields to the index with specific properties.
|
1701
1698
|
*/
|
1702
|
-
static VALUE
|
1703
|
-
|
1704
|
-
|
1705
|
-
FrtIndexWriter *iw = (FrtIndexWriter *)DATA_PTR(self);
|
1699
|
+
static VALUE frb_iw_field_infos(VALUE self) {
|
1700
|
+
FrtIndexWriter *iw;
|
1701
|
+
TypedData_Get_Struct(self, FrtIndexWriter, &frb_index_writer_t, iw);
|
1706
1702
|
return frb_get_field_infos(iw->fis);
|
1707
1703
|
}
|
1708
1704
|
|
@@ -2717,10 +2713,9 @@ frb_ir_fields(VALUE self)
|
|
2717
2713
|
*
|
2718
2714
|
* Get the FieldInfos object for this IndexReader.
|
2719
2715
|
*/
|
2720
|
-
static VALUE
|
2721
|
-
|
2722
|
-
|
2723
|
-
FrtIndexReader *ir = (FrtIndexReader *)DATA_PTR(self);
|
2716
|
+
static VALUE frb_ir_field_infos(VALUE self) {
|
2717
|
+
FrtIndexReader *ir;
|
2718
|
+
TypedData_Get_Struct(self, FrtIndexReader, &frb_index_reader_t, ir);
|
2724
2719
|
return frb_get_field_infos(ir->fis);
|
2725
2720
|
}
|
2726
2721
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-ferret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|