Commit d094c64
committed
feat(sru): enhance CQL search capabilities and performance
* SRU CQL Parser (cql_parser.py):
- Add 4 new Dublin Core search indexes:
- dc.note → note.label (MARC 500)
- dc.tableofcontents → tableOfContents (MARC 505)
- dc.abstract → summary.label (MARC 520)
- dc.dissertation → dissertation.label (MARC 502)
- Add ES_SORT_MODIFIERS for sort order mapping (ascending/descending)
- Add ES_SORT_INDEX_MAPPINGS for sortable field mappings
- Add SUPPORTED_RELATION_MODIFIERS and UNSUPPORTED_RELATION_MODIFIERS
- Fix typos: SERVER_CHOISE → SERVER_CHOICE
* SRU Explain (explaine.py):
- Add _ES_MAPPINGS_CACHE module-level dictionary for caching
- Implement ES mappings caching in __init__ to avoid repeated file I/O
- Fix unsafe open() call by using context manager
* SRU Views (views.py):
- Add EXPLAIN_CACHE_MAX_AGE (3600s) and SEARCH_CACHE_MAX_AGE (60s) constants
- Add hashlib import for cache key generation
* MARC 21 Serializer (marc.py):
- Add authority control numbers ($0) to MARC 650__ and 655__ fields
- Extract $ref from TOPIC and genreForm entities for authority links
Co-Authored-By: Peter Weber <[email protected]>1 parent ca206fa commit d094c64
File tree
16 files changed
+2363
-399
lines changed- rero_ils
- modules
- documents
- dojson/contrib
- jsontodc
- jsontomarc21
- loaders
- serializers
- sru
- theme
- scripts
- tests
- api
- selfcheck
- sru
- unit
- documents
16 files changed
+2363
-399
lines changedLines changed: 484 additions & 58 deletions
Large diffs are not rendered by default.
Lines changed: 774 additions & 109 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
32 | 76 | | |
| 77 | + | |
33 | 78 | | |
34 | 79 | | |
| 80 | + | |
| 81 | + | |
35 | 82 | | |
| 83 | + | |
36 | 84 | | |
| 85 | + | |
| 86 | + | |
37 | 87 | | |
38 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
39 | 91 | | |
| 92 | + | |
| 93 | + | |
40 | 94 | | |
41 | 95 | | |
| 96 | + | |
42 | 97 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
61 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
62 | 98 | | |
63 | 99 | | |
64 | 100 | | |
65 | 101 | | |
66 | 102 | | |
67 | 103 | | |
68 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
69 | 121 | | |
70 | 122 | | |
71 | 123 | | |
| |||
76 | 128 | | |
77 | 129 | | |
78 | 130 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
85 | 165 | | |
86 | 166 | | |
87 | 167 | | |
| |||
0 commit comments