isomorfeus-ferret 0.17.3 → 0.17.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/isomorfeus_ferret_ext/frb_index.c +48 -67
- data/ext/isomorfeus_ferret_ext/frb_search.c +47 -47
- data/ext/isomorfeus_ferret_ext/frt_document.h +3 -6
- data/ext/isomorfeus_ferret_ext/frt_field_index.c +1 -1
- data/ext/isomorfeus_ferret_ext/frt_filter.c +2 -2
- data/ext/isomorfeus_ferret_ext/frt_ind.c +2 -2
- data/ext/isomorfeus_ferret_ext/frt_ind.h +1 -1
- data/ext/isomorfeus_ferret_ext/frt_index.c +46 -62
- data/ext/isomorfeus_ferret_ext/frt_index.h +3 -3
- data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +48 -48
- data/ext/isomorfeus_ferret_ext/frt_q_const_score.c +2 -2
- data/ext/isomorfeus_ferret_ext/frt_q_filtered_query.c +4 -4
- data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +10 -10
- data/ext/isomorfeus_ferret_ext/frt_q_multi_term.c +26 -26
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +12 -12
- data/ext/isomorfeus_ferret_ext/frt_q_range.c +2 -2
- data/ext/isomorfeus_ferret_ext/frt_q_span.c +144 -145
- data/ext/isomorfeus_ferret_ext/frt_q_term.c +9 -9
- data/ext/isomorfeus_ferret_ext/frt_search.c +31 -31
- data/ext/isomorfeus_ferret_ext/frt_search.h +6 -6
- data/ext/isomorfeus_ferret_ext/frt_similarity.c +1 -1
- data/ext/isomorfeus_ferret_ext/frt_sort.c +20 -20
- data/ext/isomorfeus_ferret_ext/test.c +1 -1
- data/ext/isomorfeus_ferret_ext/test_file_deleter.c +1 -2
- data/ext/isomorfeus_ferret_ext/test_filter.c +5 -6
- data/ext/isomorfeus_ferret_ext/test_index.c +30 -32
- data/ext/isomorfeus_ferret_ext/test_search.c +7 -7
- data/ext/isomorfeus_ferret_ext/test_sort.c +3 -3
- data/ext/isomorfeus_ferret_ext/test_threading.c +1 -1
- data/lib/isomorfeus/ferret/index/index.rb +7 -7
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +12 -6
@@ -435,7 +435,6 @@ static void test_segment_term_doc_enum(TestCase *tc, void *data) {
|
|
435
435
|
tde_reader->close(tde_reader);
|
436
436
|
tde_skip_to->close(tde_skip_to);
|
437
437
|
|
438
|
-
|
439
438
|
tde = frt_stpe_new(tir, frq_in, prx_in, bv, skip_interval);
|
440
439
|
tde_skip_to = frt_stpe_new(tir, frq_in, prx_in, bv, skip_interval);
|
441
440
|
|
@@ -1033,7 +1032,7 @@ static void test_iw_del_terms(TestCase *tc, void *data) {
|
|
1033
1032
|
|
1034
1033
|
ir = frt_ir_open(NULL, store);
|
1035
1034
|
Aiequal(BOOK_LIST_LENGTH, ir->num_docs(ir));
|
1036
|
-
Aiequal(BOOK_LIST_LENGTH, ir->
|
1035
|
+
Aiequal(BOOK_LIST_LENGTH, ir->max_doc_num(ir));
|
1037
1036
|
frt_ir_close(ir);
|
1038
1037
|
|
1039
1038
|
iw = frt_iw_open(NULL, store, frt_whitespace_analyzer_new(false), &config);
|
@@ -1042,7 +1041,7 @@ static void test_iw_del_terms(TestCase *tc, void *data) {
|
|
1042
1041
|
|
1043
1042
|
ir = frt_ir_open(NULL, store);
|
1044
1043
|
Aiequal(BOOK_LIST_LENGTH - 1, ir->num_docs(ir));
|
1045
|
-
Aiequal(BOOK_LIST_LENGTH, ir->
|
1044
|
+
Aiequal(BOOK_LIST_LENGTH, ir->max_doc_num(ir));
|
1046
1045
|
frt_ir_close(ir);
|
1047
1046
|
|
1048
1047
|
/* test deleting multiple Terms */
|
@@ -1057,7 +1056,7 @@ static void test_iw_del_terms(TestCase *tc, void *data) {
|
|
1057
1056
|
|
1058
1057
|
ir = frt_ir_open(NULL, store);
|
1059
1058
|
Aiequal(BOOK_LIST_LENGTH - 17, ir->num_docs(ir));
|
1060
|
-
Aiequal(BOOK_LIST_LENGTH, ir->
|
1059
|
+
Aiequal(BOOK_LIST_LENGTH, ir->max_doc_num(ir));
|
1061
1060
|
Atrue(!ir->is_deleted(ir, 0));
|
1062
1061
|
Atrue(ir->is_deleted(ir, 1));
|
1063
1062
|
Atrue(ir->is_deleted(ir, 2));
|
@@ -1089,7 +1088,7 @@ static void test_iw_del_terms(TestCase *tc, void *data) {
|
|
1089
1088
|
|
1090
1089
|
ir = frt_ir_open(NULL, store);
|
1091
1090
|
Aiequal(BOOK_LIST_LENGTH - 17, ir->num_docs(ir));
|
1092
|
-
Aiequal(BOOK_LIST_LENGTH - 17, ir->
|
1091
|
+
Aiequal(BOOK_LIST_LENGTH - 17, ir->max_doc_num(ir));
|
1093
1092
|
frt_ir_close(ir);
|
1094
1093
|
}
|
1095
1094
|
|
@@ -1268,7 +1267,7 @@ static void test_ir_open_empty_index(TestCase *tc, void *data) {
|
|
1268
1267
|
static void test_ir_basic_ops(TestCase *tc, void *data) {
|
1269
1268
|
FrtIndexReader *ir = (FrtIndexReader *)data;
|
1270
1269
|
Aiequal(IR_TEST_DOC_CNT, ir->num_docs(ir));
|
1271
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1270
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1272
1271
|
|
1273
1272
|
Aiequal(4, ir->doc_freq(ir, frt_fis_get_field(ir->fis, body)->number, "Wally"));
|
1274
1273
|
Atrue(frt_ir_is_latest(ir));
|
@@ -1361,7 +1360,7 @@ static void test_ir_term_doc_enum(TestCase *tc, void *data) {
|
|
1361
1360
|
|
1362
1361
|
FrtTermDocEnum *tde;
|
1363
1362
|
FrtDocument *doc = frt_ir_get_doc_with_term(ir, tag, "id_test");
|
1364
|
-
int
|
1363
|
+
int doc_nums[3], expected_doc_nums[3];
|
1365
1364
|
int freqs[3], expected_freqs[3];
|
1366
1365
|
|
1367
1366
|
Apnotnull(doc);
|
@@ -1391,34 +1390,33 @@ static void test_ir_term_doc_enum(TestCase *tc, void *data) {
|
|
1391
1390
|
|
1392
1391
|
/* test fast read. Use a small array to exercise repeat read */
|
1393
1392
|
tde->seek(tde, frt_fis_get_field(ir->fis, body)->number, "read");
|
1394
|
-
Aiequal(3, tde->read(tde,
|
1393
|
+
Aiequal(3, tde->read(tde, doc_nums, freqs, 3));
|
1395
1394
|
AA3(expected_freqs, 1, 2, 4);
|
1396
|
-
AA3(
|
1397
|
-
Aaiequal(
|
1395
|
+
AA3(expected_doc_nums, 1, 2, 6);
|
1396
|
+
Aaiequal(expected_doc_nums, doc_nums, 3);
|
1398
1397
|
Aaiequal(expected_freqs, freqs, 3);
|
1399
1398
|
|
1400
|
-
Aiequal(3, tde->read(tde,
|
1401
|
-
AA3(
|
1399
|
+
Aiequal(3, tde->read(tde, doc_nums, freqs, 3));
|
1400
|
+
AA3(expected_doc_nums, 9, 10, 15);
|
1402
1401
|
AA3(expected_freqs, 3, 1, 1);
|
1403
|
-
Aaiequal(
|
1402
|
+
Aaiequal(expected_doc_nums, doc_nums, 3);
|
1404
1403
|
Aaiequal(expected_freqs, freqs, 3);
|
1405
1404
|
|
1406
|
-
Aiequal(3, tde->read(tde,
|
1407
|
-
AA3(
|
1405
|
+
Aiequal(3, tde->read(tde, doc_nums, freqs, 3));
|
1406
|
+
AA3(expected_doc_nums, 16, 17, 20);
|
1408
1407
|
AA3(expected_freqs, 2, 1, 1);
|
1409
|
-
Aaiequal(
|
1408
|
+
Aaiequal(expected_doc_nums, doc_nums, 3);
|
1410
1409
|
Aaiequal(expected_freqs, freqs, 3);
|
1411
1410
|
|
1412
|
-
Aiequal(1, tde->read(tde,
|
1413
|
-
|
1411
|
+
Aiequal(1, tde->read(tde, doc_nums, freqs, 3));
|
1412
|
+
expected_doc_nums[0] = 21;
|
1414
1413
|
expected_freqs[0] = 6;
|
1415
|
-
Aaiequal(
|
1414
|
+
Aaiequal(expected_doc_nums, doc_nums, 1);
|
1416
1415
|
Aaiequal(expected_freqs, freqs, 1);
|
1417
1416
|
|
1418
|
-
Aiequal(0, tde->read(tde,
|
1417
|
+
Aiequal(0, tde->read(tde, doc_nums, freqs, 3));
|
1419
1418
|
|
1420
|
-
test_ir_term_docpos_enum_skip_to(tc, tde,
|
1421
|
-
frt_fis_get_field(ir->fis, text)->number);
|
1419
|
+
test_ir_term_docpos_enum_skip_to(tc, tde, frt_fis_get_field(ir->fis, text)->number);
|
1422
1420
|
tde->close(tde);
|
1423
1421
|
|
1424
1422
|
/* test term positions */
|
@@ -1787,37 +1785,37 @@ static void test_ir_delete(TestCase *tc, void *data) {
|
|
1787
1785
|
ir2 = reader_test_env_ir_open(rte);
|
1788
1786
|
|
1789
1787
|
Aiequal(false, ir->has_deletions(ir));
|
1790
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1788
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1791
1789
|
Aiequal(IR_TEST_DOC_CNT, ir->num_docs(ir));
|
1792
1790
|
Aiequal(false, ir->is_deleted(ir, 10));
|
1793
1791
|
|
1794
1792
|
frt_ir_delete_doc(ir, 10);
|
1795
1793
|
Aiequal(true, ir->has_deletions(ir));
|
1796
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1794
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1797
1795
|
Aiequal(IR_TEST_DOC_CNT - 1, ir->num_docs(ir));
|
1798
1796
|
Aiequal(true, ir->is_deleted(ir, 10));
|
1799
1797
|
|
1800
1798
|
frt_ir_delete_doc(ir, 10);
|
1801
1799
|
Aiequal(true, ir->has_deletions(ir));
|
1802
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1800
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1803
1801
|
Aiequal(IR_TEST_DOC_CNT - 1, ir->num_docs(ir));
|
1804
1802
|
Aiequal(true, ir->is_deleted(ir, 10));
|
1805
1803
|
|
1806
1804
|
frt_ir_delete_doc(ir, IR_TEST_DOC_CNT - 1);
|
1807
1805
|
Aiequal(true, ir->has_deletions(ir));
|
1808
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1806
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1809
1807
|
Aiequal(IR_TEST_DOC_CNT - 2, ir->num_docs(ir));
|
1810
1808
|
Aiequal(true, ir->is_deleted(ir, IR_TEST_DOC_CNT - 1));
|
1811
1809
|
|
1812
1810
|
frt_ir_delete_doc(ir, IR_TEST_DOC_CNT - 2);
|
1813
1811
|
Aiequal(true, ir->has_deletions(ir));
|
1814
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1812
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1815
1813
|
Aiequal(IR_TEST_DOC_CNT - 3, ir->num_docs(ir));
|
1816
1814
|
Aiequal(true, ir->is_deleted(ir, IR_TEST_DOC_CNT - 2));
|
1817
1815
|
|
1818
1816
|
frt_ir_undelete_all(ir);
|
1819
1817
|
Aiequal(false, ir->has_deletions(ir));
|
1820
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1818
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1821
1819
|
Aiequal(IR_TEST_DOC_CNT, ir->num_docs(ir));
|
1822
1820
|
Aiequal(false, ir->is_deleted(ir, 10));
|
1823
1821
|
Aiequal(false, ir->is_deleted(ir, IR_TEST_DOC_CNT - 2));
|
@@ -1830,7 +1828,7 @@ static void test_ir_delete(TestCase *tc, void *data) {
|
|
1830
1828
|
frt_ir_delete_doc(ir, 50);
|
1831
1829
|
frt_ir_delete_doc(ir, IR_TEST_DOC_CNT - 1);
|
1832
1830
|
Aiequal(true, ir->has_deletions(ir));
|
1833
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1831
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1834
1832
|
Aiequal(IR_TEST_DOC_CNT - 6, ir->num_docs(ir));
|
1835
1833
|
|
1836
1834
|
frt_ir_close(ir);
|
@@ -1838,7 +1836,7 @@ static void test_ir_delete(TestCase *tc, void *data) {
|
|
1838
1836
|
ir = reader_test_env_ir_open(rte);
|
1839
1837
|
|
1840
1838
|
Aiequal(true, ir->has_deletions(ir));
|
1841
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1839
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1842
1840
|
Aiequal(IR_TEST_DOC_CNT - 6, ir->num_docs(ir));
|
1843
1841
|
Aiequal(true, ir->is_deleted(ir, 10));
|
1844
1842
|
Aiequal(true, ir->is_deleted(ir, 20));
|
@@ -1849,7 +1847,7 @@ static void test_ir_delete(TestCase *tc, void *data) {
|
|
1849
1847
|
|
1850
1848
|
frt_ir_undelete_all(ir);
|
1851
1849
|
Aiequal(false, ir->has_deletions(ir));
|
1852
|
-
Aiequal(IR_TEST_DOC_CNT, ir->
|
1850
|
+
Aiequal(IR_TEST_DOC_CNT, ir->max_doc_num(ir));
|
1853
1851
|
Aiequal(IR_TEST_DOC_CNT, ir->num_docs(ir));
|
1854
1852
|
Aiequal(false, ir->is_deleted(ir, 10));
|
1855
1853
|
Aiequal(false, ir->is_deleted(ir, 20));
|
@@ -1876,7 +1874,7 @@ static void test_ir_delete(TestCase *tc, void *data) {
|
|
1876
1874
|
ir = reader_test_env_ir_open(rte);
|
1877
1875
|
|
1878
1876
|
Aiequal(false, ir->has_deletions(ir));
|
1879
|
-
Aiequal(IR_TEST_DOC_CNT - 6, ir->
|
1877
|
+
Aiequal(IR_TEST_DOC_CNT - 6, ir->max_doc_num(ir));
|
1880
1878
|
Aiequal(IR_TEST_DOC_CNT - 6, ir->num_docs(ir));
|
1881
1879
|
|
1882
1880
|
Atrue(frt_ir_is_latest(ir));
|
@@ -25,7 +25,7 @@ static int my_doc_freq(FrtSearcher *searcher, ID field, const char *term) {
|
|
25
25
|
return 9;
|
26
26
|
}
|
27
27
|
|
28
|
-
static int
|
28
|
+
static int my_max_doc_num(FrtSearcher *searcher) {
|
29
29
|
(void)searcher;
|
30
30
|
return 10;
|
31
31
|
}
|
@@ -89,7 +89,7 @@ static void test_default_similarity(TestCase *tc, void *data) {
|
|
89
89
|
Afequal(1.0, frt_sim_idf(dsim, 9, 10));
|
90
90
|
Afequal(4.0, frt_sim_coord(dsim, 12, 3));
|
91
91
|
searcher.doc_freq = &my_doc_freq;
|
92
|
-
searcher.
|
92
|
+
searcher.max_doc_num = &my_max_doc_num;
|
93
93
|
Afequal(1.0, frt_sim_idf_term(dsim, field, positions[0].terms[0], &searcher));
|
94
94
|
Afequal(12.0, frt_sim_idf_phrase(dsim, field, positions, 4, &searcher));
|
95
95
|
|
@@ -262,7 +262,7 @@ void tst_check_hits(TestCase *tc, FrtSearcher *searcher, FrtQuery *query, const
|
|
262
262
|
}
|
263
263
|
Tmsg_nf("\n\tseen docs:\n\t ");
|
264
264
|
for (i = 0; i < top_docs->size; i++) {
|
265
|
-
Tmsg_nf("%d ", top_docs->hits[i]->
|
265
|
+
Tmsg_nf("%d ", top_docs->hits[i]->doc_num);
|
266
266
|
}
|
267
267
|
Tmsg_nf("\n");
|
268
268
|
}
|
@@ -273,19 +273,19 @@ void tst_check_hits(TestCase *tc, FrtSearcher *searcher, FrtQuery *query, const
|
|
273
273
|
*/
|
274
274
|
|
275
275
|
if ((top >= 0) && top_docs->size)
|
276
|
-
Aiequal(top, top_docs->hits[0]->
|
276
|
+
Aiequal(top, top_docs->hits[0]->doc_num);
|
277
277
|
for (i = 0; i < top_docs->size; i++) {
|
278
278
|
FrtHit *hit = top_docs->hits[i];
|
279
279
|
float normalized_score = hit->score / top_docs->max_score;
|
280
280
|
Assert(0.0 < normalized_score && normalized_score <= 1.0, "hit->score <%f> is out of range (0.0..1.0]", normalized_score);
|
281
|
-
Assert(frt_ary_includes(num_array, total_hits, hit->
|
281
|
+
Assert(frt_ary_includes(num_array, total_hits, hit->doc_num), "doc %d was found unexpectedly", hit->doc_num);
|
282
282
|
/* only check the explanation if we got the correct docs. Obviously we
|
283
283
|
* might want to remove this to visually check the explanations */
|
284
284
|
if (!tc->failed && total_hits == top_docs->total_hits) {
|
285
|
-
FrtExplanation *e = frt_searcher_explain(searcher, query, hit->
|
285
|
+
FrtExplanation *e = frt_searcher_explain(searcher, query, hit->doc_num);
|
286
286
|
if (! Afequal(hit->score, e->value)) {
|
287
287
|
char *t;
|
288
|
-
Tmsg("\n\"\"\"\n%d>>\n%f\n%s\n\"\"\"\n", hit->
|
288
|
+
Tmsg("\n\"\"\"\n%d>>\n%f\n%s\n\"\"\"\n", hit->doc_num, hit->score, t = frt_expl_to_s(e));
|
289
289
|
free(t);
|
290
290
|
}
|
291
291
|
frt_expl_destroy(e);
|
@@ -97,7 +97,7 @@ static void do_test_top_docs(TestCase *tc, FrtSearcher *searcher, FrtQuery *quer
|
|
97
97
|
if (false && sort && searcher->doc_freq != frt_isea_doc_freq) {
|
98
98
|
FrtFieldDoc *fd = (FrtFieldDoc *)hit;
|
99
99
|
int j;
|
100
|
-
printf("%d == %d:%f ", num_array[i], hit->
|
100
|
+
printf("%d == %d:%f ", num_array[i], hit->doc_num, hit->score);
|
101
101
|
for (j = 0; j < fd->size; j++) {
|
102
102
|
switch (fd->comparables[j].type) {
|
103
103
|
case FRT_SORT_TYPE_SCORE:
|
@@ -116,7 +116,7 @@ static void do_test_top_docs(TestCase *tc, FrtSearcher *searcher, FrtQuery *quer
|
|
116
116
|
}
|
117
117
|
printf("\n");
|
118
118
|
}
|
119
|
-
Aiequal(num_array[i], hit->
|
119
|
+
Aiequal(num_array[i], hit->doc_num);
|
120
120
|
}
|
121
121
|
frt_td_destroy(top_docs);
|
122
122
|
|
@@ -124,7 +124,7 @@ static void do_test_top_docs(TestCase *tc, FrtSearcher *searcher, FrtQuery *quer
|
|
124
124
|
top_docs = frt_searcher_search(searcher, query, R_START, R_END - R_START, NULL, sort, NULL);
|
125
125
|
for (i = R_START; i < R_END; i++) {
|
126
126
|
FrtHit *hit = top_docs->hits[i - R_START];
|
127
|
-
Aiequal(num_array[i], hit->
|
127
|
+
Aiequal(num_array[i], hit->doc_num);
|
128
128
|
/*
|
129
129
|
printf("%d == %d\n", num_array[i], hit->doc);
|
130
130
|
*/
|
@@ -82,7 +82,7 @@ static void do_search(FrtIndex *index) {
|
|
82
82
|
free(query);
|
83
83
|
for (i = 0; i < td->size; i++) {
|
84
84
|
FrtHit *hit = td->hits[i];
|
85
|
-
FrtDocument *doc = frt_index_get_doc(index, hit->
|
85
|
+
FrtDocument *doc = frt_index_get_doc(index, hit->doc_num);
|
86
86
|
tlog("Hit for %d: %s - %f\n", hit->doc, frt_doc_get_field(doc, id)->data[0], hit->score);
|
87
87
|
frt_doc_destroy(doc);
|
88
88
|
}
|
@@ -164,8 +164,8 @@ module Isomorfeus
|
|
164
164
|
end
|
165
165
|
|
166
166
|
# Returns an array of strings with the matches highlighted. The +query+ can
|
167
|
-
# either a query String or a Ferret::Search::Query object. The
|
168
|
-
# the
|
167
|
+
# either a query String or a Ferret::Search::Query object. The doc_num is
|
168
|
+
# the number of the document you want to highlight (usually returned by the
|
169
169
|
# search methods). There are also a number of options you can pass;
|
170
170
|
#
|
171
171
|
# === Options
|
@@ -190,11 +190,11 @@ module Isomorfeus
|
|
190
190
|
# excerpt hits the start or end of the field.
|
191
191
|
# Alternatively you may want to use the HTML entity
|
192
192
|
# … or the UTF-8 string "\342\200\246".
|
193
|
-
def highlight(query,
|
193
|
+
def highlight(query, doc_num, options = {})
|
194
194
|
@dir.synchronize do
|
195
195
|
ensure_searcher_open()
|
196
196
|
@searcher.highlight(do_process_query(query),
|
197
|
-
|
197
|
+
doc_num,
|
198
198
|
options[:field]||@options[:default_field],
|
199
199
|
options)
|
200
200
|
end
|
@@ -327,7 +327,7 @@ module Isomorfeus
|
|
327
327
|
# to specify a fields type to sort it correctly. For more
|
328
328
|
# on this, see the documentation for SortField
|
329
329
|
# filter:: a Filter object to filter the search results with
|
330
|
-
# filter_proc:: a filter Proc is a Proc which takes the
|
330
|
+
# filter_proc:: a filter Proc is a Proc which takes the doc_num, the score
|
331
331
|
# and the Searcher object as its parameters and returns a
|
332
332
|
# Boolean value specifying whether the result should be
|
333
333
|
# included in the result set.
|
@@ -342,7 +342,7 @@ module Isomorfeus
|
|
342
342
|
# query string that can be validly parsed by the Ferret::QueryParser. The
|
343
343
|
# Searcher#search_each method yields the internal document id (used to
|
344
344
|
# reference documents in the Searcher object like this;
|
345
|
-
# +searcher[
|
345
|
+
# +searcher[doc_num]+) and the search score for that document. It is
|
346
346
|
# possible for the score to be greater than 1.0 for some queries and
|
347
347
|
# taking boosts into account. This method will also normalize scores to
|
348
348
|
# the range 0.0..1.0 when the max-score is greater than 1.0. Here are the
|
@@ -370,7 +370,7 @@ module Isomorfeus
|
|
370
370
|
# to specify a fields type to sort it correctly. For more
|
371
371
|
# on this, see the documentation for SortField
|
372
372
|
# filter:: a Filter object to filter the search results with
|
373
|
-
# filter_proc:: a filter Proc is a Proc which takes the
|
373
|
+
# filter_proc:: a filter Proc is a Proc which takes the doc_num, the score
|
374
374
|
# and the Searcher object as its parameters and returns a
|
375
375
|
# Boolean value specifying whether the result should be
|
376
376
|
# included in the result set.
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-ferret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.13.23
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.15.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 3.13.23
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.15.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: msgpack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -413,7 +419,7 @@ metadata:
|
|
413
419
|
source_code_uri: https://github.com/isomorfeus/isomorfeus-ferret
|
414
420
|
post_install_message: |2+
|
415
421
|
|
416
|
-
isomorfeus-ferret 0.17.
|
422
|
+
isomorfeus-ferret 0.17.4:
|
417
423
|
|
418
424
|
Development in progress:
|
419
425
|
- It may eat all your files, when hungry!
|
@@ -434,7 +440,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
434
440
|
- !ruby/object:Gem::Version
|
435
441
|
version: '0'
|
436
442
|
requirements: []
|
437
|
-
rubygems_version: 3.4.
|
443
|
+
rubygems_version: 3.4.10
|
438
444
|
signing_key:
|
439
445
|
specification_version: 4
|
440
446
|
summary: Indexed document store for Isomorfeus.
|