1 | static L<S> scoredSearch_eachTerm(S query, Iterable<S> data) { |
2 | new LinkedHashMap<S, Int> scores; // preserve original order within score group |
3 | L<S> prepared = scoredSearch_prepare(query); |
4 | for (S s : data) { |
5 | int score = scoredSearch_score_eachTerm(s, prepared); |
6 | if (score != 0) |
7 | scores.put(s, score); |
8 | } |
9 | ret keysSortedByValuesDesc(scores); |
10 | } |
Began life as a copy of #1007531
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1016997 |
Snippet name: | scoredSearch_eachTerm - only return results where each term matches |
Eternal ID of this version: | #1016997/3 |
Text MD5: | 012f150a4b797a96d7649e1b0562ec3c |
Author: | stefan |
Category: | javax / text |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-20 15:06:42 |
Source code size: | 371 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 378 / 433 |
Version history: | 2 change(s) |
Referenced in: | [show references] |