Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
432eacf
Add initial typenormalization script
niklasl May 13, 2024
db949ce
Convert instance and work together
niklasl May 13, 2024
f953b19
Add more examples
niklasl May 13, 2024
e131ef0
Add manuscript examples
niklasl May 28, 2024
4a5a857
Add more examples (book-like or book-adjacent)
niklasl Jun 10, 2024
7cd3b1c
Add more examples (and remove duplicates)
niklasl Jul 8, 2024
191e723
Update typenormalization whelk script
niklasl Jul 8, 2024
24c74af
Update typenormalization scripts
niklasl Sep 10, 2024
53cb67b
Add example (small story book)
niklasl Sep 27, 2024
b7d9dfc
Parameterize "nowhelk" typenormalization script
niklasl Sep 27, 2024
0cec5de
Add note reference to LC marc2bibframe codemap
niklasl Oct 9, 2024
98f33d7
Update type normalization algorithm
niklasl Oct 10, 2024
ea63e09
Tweak Map and Globe type normalization hacks
niklasl Oct 10, 2024
96f6d13
Use bib collection in type normalization main script
niklasl Oct 11, 2024
0c62731
Change Poster sheet assumption to conditional
niklasl Oct 11, 2024
2ec5cdf
Move simplifyAssociatedMedia to mediareprs script
niklasl Oct 29, 2024
fffe455
Refactor type-normalization algorithm a bit
niklasl Oct 29, 2024
b5fb02b
Add makediff.sh for verification/test
niklasl Feb 11, 2025
71023a6
Update instructions in typenormalization nowhelk
niklasl Feb 11, 2025
01d4114
Plug a Whelk into TypeNormalizer for vocab access
niklasl Feb 11, 2025
5ea5807
Update issuanceType handling in type normalizer
niklasl Feb 11, 2025
6f72a6b
Add representative examples for typenormalization
niklasl Feb 12, 2025
efef27d
Refactor and update type normalization algorithm
niklasl Feb 13, 2025
8682cda
Refactor typenormalization algorithm
niklasl Feb 18, 2025
c1473a8
Move more type normalization maps to mappings file
niklasl Feb 18, 2025
92becb3
Refactor
niklasl Feb 18, 2025
6b2ff8f
Update type normalization algorithm and mappings
niklasl Feb 19, 2025
360ce24
Add example of published short story
niklasl Feb 19, 2025
e72c4be
Add testdatasets typenormalization script
niklasl Feb 26, 2025
acdc9fc
Update instructions about example datasets
niklasl Feb 27, 2025
31d1c21
Add typenormalization README
niklasl Feb 28, 2025
5271a36
Fix nowhelk and make-lddb-datasets scripts
niklasl Mar 3, 2025
24d07c5
Add utility for getting XLIDs from example lists
niklasl Mar 3, 2025
3b2e95b
Update type normalization algorithm and mappings
niklasl Mar 4, 2025
56ac139
Update diff script
niklasl Mar 4, 2025
ab287a8
Att categoryalgorithm and update runner scripts
niklasl Mar 4, 2025
0cbd1da
Update categoryalgorithm
niklasl Mar 4, 2025
baedf25
Fix xl-ids in lists of examples
niklasl Mar 5, 2025
9242925
Update makediff script
niklasl Mar 5, 2025
780db8d
Change back from issuance to issuanceType
niklasl Mar 5, 2025
f3a2d0e
Require base URI in make-lddb-datasets
niklasl Mar 10, 2025
89a40b9
Add allow-id-removal flag to dataset importer cmd
niklasl Mar 10, 2025
da146d8
Add option to retain contentType, carrierTyepe and genreForm
branchedelac Mar 17, 2025
34e97d9
add new system property addCategory
branchedelac Apr 11, 2025
9ef72e2
use addCategory condition for works and instances
branchedelac Apr 11, 2025
e486775
Add new algorithm for simple types with optional category
branchedelac Apr 11, 2025
01408f5
print out whether ctaegory will be added
branchedelac Apr 11, 2025
b9e77f5
add code with option
branchedelac Apr 11, 2025
5bc29df
fix typo
branchedelac Apr 14, 2025
9cd44a2
delete file
branchedelac Apr 14, 2025
13a8d14
add some explanatory comments
branchedelac Apr 14, 2025
d6f8648
add some more structuring comments
branchedelac Apr 17, 2025
d8fd2b2
add even more structuring comments
branchedelac Apr 17, 2025
6796e53
specify if category in outfile name
branchedelac Apr 22, 2025
75e2fa0
Quickly test any record with and without category
branchedelac Apr 24, 2025
95d1447
rename reports
branchedelac Apr 24, 2025
0f88107
Add instructions
branchedelac Apr 24, 2025
a506dd0
Add forgotten contentType
branchedelac Apr 24, 2025
231486d
Correct namespace for (tentative) EBook GF
niklasl Apr 24, 2025
01a6962
Prepare to merge with categoryalgorithm
niklasl Apr 25, 2025
fd905f4
Fix some typos and minor errors
branchedelac Apr 28, 2025
c19a9c6
Ensure instanceGenreForms is a List
niklasl Apr 28, 2025
021ef29
use gzip
branchedelac May 2, 2025
e311baf
Add script for getting category mappings
niklasl May 12, 2025
95daaa4
add some minimalistic exampels
branchedelac May 14, 2025
387505b
overwrite zipped file if it already exists
branchedelac May 14, 2025
7c8e0ae
add mainEntity
branchedelac May 14, 2025
1910987
Add initial data-driven category-normalization
niklasl May 14, 2025
c91c107
Use vocab keys instead of IRIs in typeToCategory
niklasl May 15, 2025
56bad9f
Add examples
niklasl May 15, 2025
73c00d2
Include `barngf:` in typenormalization mappings
niklasl May 15, 2025
8f1ce95
Move back cleanupTypes to whelktool script
niklasl May 15, 2025
9126a49
Small typenormalization fixes
niklasl May 15, 2025
c24ad57
Add more examples
branchedelac May 15, 2025
036267f
Add more examples
branchedelac May 15, 2025
86a323b
print test titles
branchedelac May 19, 2025
f43c8fb
Replace more idiomatic code with use of mappings
niklasl May 15, 2025
af8a483
Fix Globe IRI and add note re. electronic
niklasl May 28, 2025
23ee733
Fix bug on non-strings in dropRedundantString
niklasl Jun 3, 2025
502378f
Fix missing ID bug in simplifyWorkType
niklasl Jun 3, 2025
c617ce1
Update category mappings and fix cyclic bug
niklasl Jun 4, 2025
487dae8
Update examples.txt
katnai1 Jun 4, 2025
2d2f929
Improve cyclic check
niklasl Jun 4, 2025
ab25386
Update generated category mappings
niklasl Jun 4, 2025
61fa226
Update generated category mappings
niklasl Jun 11, 2025
54cfd43
Avoid using new value of issuanceType
niklasl Jun 13, 2025
b021a32
Correct RDA URIs in algorithm
niklasl Jun 13, 2025
91d67f8
Include exactMatches (and TGM terms) in mappings
niklasl Jun 13, 2025
d6984f9
Update generated category mappings
niklasl Jun 18, 2025
8c77716
add flag to make adding new issuanceTypes optional
branchedelac Sep 23, 2025
e321500
Add simple apply-rdf-patch whelktool script
niklasl Sep 22, 2025
5f83d95
Add special handling for more work types
branchedelac Sep 24, 2025
3367b78
feat(jsonld): Handle @container: @index in toCard/toChip
olovy Sep 25, 2025
471747b
feat/experimental: generate _categoryByCollection
olovy Sep 4, 2025
cce4df9
Merge branch 'feature/lws-268-category-incollection' into feature/typ…
olovy Sep 25, 2025
624e1ae
Analyze and add some checks for work and instance type mappings
branchedelac Sep 25, 2025
8a4dff8
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Sep 26, 2025
c687bf6
feat: generate (non-working) facets for _categoryByCollection
olovy Sep 26, 2025
9781dce
Ensure categories are added for all applicable work and instance types
branchedelac Sep 26, 2025
447aa51
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Sep 26, 2025
d22647f
Add whelktool script for creating records from RDF
niklasl Sep 26, 2025
53f6464
Log records with no category added
branchedelac Sep 29, 2025
84656de
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Sep 29, 2025
4cd7e81
fix(db): Don't remove definitions from context doc
olovy Sep 29, 2025
3d00158
Move old issuanceType from work type to instance category
branchedelac Sep 29, 2025
108753f
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Sep 29, 2025
a311766
Update direct RDF-using whelktool scripts
niklasl Sep 29, 2025
c1fc27d
feat(search): WIP _categoryByCollection facets
olovy Sep 29, 2025
ef85271
Handle set and lang containers in RDF-patch script
niklasl Sep 30, 2025
4d8db8b
Improve apply-rdf-patch whelktool script
niklasl Sep 30, 2025
d8f6a1f
Allow patch script to also create new records
niklasl Sep 30, 2025
a1d2b5b
Replace ktg with saogf or rda when applicable
branchedelac Sep 30, 2025
70faa4e
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Sep 30, 2025
605dfbd
Improve link expansion checks in apply-rdf-patch
niklasl Oct 1, 2025
8a6c01b
Expand links in newly created apply-rdf-patch data
niklasl Oct 1, 2025
175b099
Add Record type to new apply-rdf-patch records
niklasl Oct 1, 2025
bb44bde
Track all existing ids, not only actually updated
niklasl Oct 1, 2025
518bed2
Check if single values actually cause a change
niklasl Oct 2, 2025
309839e
Only consider actually expanded links as modified
niklasl Oct 2, 2025
cfbc934
Fix some classic "off by one" bugs
niklasl Oct 2, 2025
f51c6ee
Remove some hard-coded mappings now constructed in make_mappings
branchedelac Oct 2, 2025
47f0164
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 2, 2025
affb71a
Adapt makemappings
niklasl Oct 2, 2025
5128842
Find matching categories via category base class
niklasl Oct 2, 2025
4072ad1
Find matching categories via category base class
niklasl Oct 2, 2025
2dbf8c4
Remove another hard-coded mappings now constructed in make_mappings
branchedelac Oct 2, 2025
838a77b
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 2, 2025
69abb66
Update typenormalization mappings
niklasl Oct 2, 2025
f4556e4
Actually check if instance type is PhysicalResource
branchedelac Oct 2, 2025
3c6b725
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 2, 2025
8e32db7
Update generated typenormalization mappings
niklasl Oct 3, 2025
e0e9b5b
fix(embellish): exactMatch terms with same category disappear
olovy Oct 3, 2025
bb91769
fix(validation): Allow _categoryByCollection
olovy Oct 6, 2025
31cfa3f
Add optional delete graph spec to apply-rdf-patch
niklasl Oct 7, 2025
158b429
Merge branch 'develop' into feature/typenormalization
kwahlin Oct 10, 2025
7c6e914
feat(search2): sub-slices (#1648)
olovy Oct 17, 2025
f19087c
feat(search2): Add xl.test.apps.jsonld system property
olovy Oct 17, 2025
50c1aa5
chore(search2): Get rid of statsRepr baggage
olovy Oct 17, 2025
fb7587d
fix(search2): SelectedFilters for subSlices
olovy Oct 20, 2025
8e8a05f
Merge pull request #1649 from libris/feature/lws-268-category-incolle…
olovy Oct 20, 2025
3fa0062
feat: Compute _categoryByCollection.@none
olovy Oct 20, 2025
2180690
Use category predicate for GenreForm types
johanbissemattsson Oct 21, 2025
be4b8b5
feat(search2): WIP: Add support for menu style facets
olovy Oct 23, 2025
a1c85e8
feat(reproduction-api): Allow new form DigitalResource
olovy Oct 27, 2025
5359315
Add more specific examples
branchedelac Oct 28, 2025
21b9f46
Remove MARC term Other from instance Category
branchedelac Oct 28, 2025
c3f9e35
Remove MARC term Other from Instance Category for real
branchedelac Oct 28, 2025
386d0b7
Merge branch 'develop' into feature/typenormalization
olovy Oct 28, 2025
d31db87
Move all terms in genreForm on instance to work
branchedelac Oct 29, 2025
582215d
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 29, 2025
9e5e22a
Feature/search2 sticky filters (#1651)
kwahlin Oct 29, 2025
ab9809b
chore(embellish): Naming in spec
olovy Oct 29, 2025
9d88c19
Reorder normalizaition methods
branchedelac Oct 29, 2025
45942ae
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 29, 2025
4e26fd5
fix(embellish): don't follow the same integral relation in reverse
olovy Oct 29, 2025
5898708
Merge pull request #1653 from libris/bugfix/lxl-4719-linked-instance-…
olovy Oct 29, 2025
cd04e15
Add example to test moving of instance GFs to work
branchedelac Oct 30, 2025
9b362a2
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Oct 30, 2025
47cff1c
Keep AND-selected observations and include connective in slice (#1656)
kwahlin Nov 3, 2025
817d49d
fix(search2): null SelectedFacets.getConnective
olovy Nov 3, 2025
f4f7fa3
fix(search2): collect links from parsed filter in search mapping
kwahlin Nov 3, 2025
14afea1
fix(search2): restore boost for language links
kwahlin Nov 3, 2025
73280b8
Keep unlinked GFs on the instance
branchedelac Nov 3, 2025
2f33bb4
Merge branch 'feature/typenormalization' of github.com:libris/librisx…
branchedelac Nov 3, 2025
c87606f
Merge branch 'develop' into feature/typenormalization
olovy Nov 4, 2025
0be38b8
Feature/year range (#1657)
kwahlin Nov 4, 2025
f71e039
Group term mappings by namespace
kwahlin Sep 18, 2025
661a7c1
Include namespace in disambiguation to prevent unnecessary conflicts
kwahlin Sep 18, 2025
0ac9a98
Cleanup
kwahlin Sep 19, 2025
c18896b
Remove confusing ns mapping
kwahlin Nov 5, 2025
61df2a3
Include bibdb in ns precedence order
kwahlin Nov 5, 2025
86ee0cd
Update hard-coded terms
kwahlin Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion importers/src/main/groovy/whelk/importer/ImporterMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ImporterMain {
}

@Command(args='SOURCE_URL DATASET_URI [DATASET_DESCRIPTION_FILE]',
flags='--skip-index --replace-main-ids --force-delete --skip-dependers')
flags='--skip-index --replace-main-ids --force-delete --skip-dependers --allow-id-removal')
void dataset(Map flags, String sourceUrl, String datasetUri, String datasetDescPath=null) {
Whelk whelk = Whelk.createLoadedSearchWhelk(props)
if (flags['skip-index']) {
Expand All @@ -40,6 +40,9 @@ class ImporterMain {
if (flags['skip-dependers']) {
whelk.setSkipIndexDependers(true)
}
if (flags['allow-id-removal']) {
whelk.storage.doVerifyDocumentIdRetention = false
}
new DatasetImporter(whelk, datasetUri, flags, datasetDescPath).importDataset(sourceUrl)
}

Expand Down
10 changes: 10 additions & 0 deletions librisxl-tools/elasticsearch/libris_search_boost.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"missing": 0
},
"weight": 10
},
{
"type": "field_value_factor",
"params": {
"field": "reverseLinks.totalItemsByRelation.instanceOf.language",
"factor": 10,
"modifier": "ln1p",
"missing": 0
},
"weight": 10
}
],
"score_mode": "sum",
Expand Down
3 changes: 2 additions & 1 deletion rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ task(appRun, dependsOn: "classes", type: JavaExec) {
'xl.secret.properties': System.getProperty("xl.secret.properties"),
'xl.logRoot': System.getProperty("xl.logRoot", "./logs"),
'xl.http.port': System.getProperty("xl.http.port", "8180"),
'xl.test.rewriteSparqlResultIds': System.getProperty("xl.test.rewriteSparqlResultIds", "false")
'xl.test.rewriteSparqlResultIds': System.getProperty("xl.test.rewriteSparqlResultIds", "false"),
'xl.test.apps.jsonld': System.getProperty("xl.test.apps.jsonld")
)
args(System.getProperty("args", "").split() as String[])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ import static javax.servlet.http.HttpServletResponse.SC_PRECONDITION_FAILED
import static se.kb.libris.digi.DigitalReproductionAPI.Type.ARRAY
import static se.kb.libris.digi.DigitalReproductionAPI.Type.STRING

// TODO clean up digital vs electronic when type normalization has landed in production

/**
Creates a record for a digital reproduction.
Takes JSON-LD with an Electronic describing the reproduction as input.
Takes JSON-LD with a DigitalResource/Electronic describing the reproduction as input.

- Validates that minimal required data is present in Electronic (all additional data is kept).
- Validates that minimal required data is present in DigitalResource/Electronic (all additional data is kept).
- Extracts and links work entity from reproduction and original (physical thing)
- Copies title from original
- Adds DIGI and DST bibliographies if applicable
Expand Down Expand Up @@ -127,7 +129,12 @@ class DigitalReproductionAPI extends HttpServlet {

def electronic = readJson(request)

check(electronic, ['@type'], 'Electronic')
try {
check(electronic, ['@type'], 'Electronic')
} catch (RequestException ignored) {
check(electronic, ['@type'], 'DigitalResource')
}

check(electronic, ['reproductionOf', '@id'], STRING)
check(electronic, ['production'], ARRAY)
if (!isLink(getAtPath(electronic, ['production', 0]))) { // minimal valid shape, so just check the first one
Expand Down Expand Up @@ -203,6 +210,9 @@ class ReproductionService {
if (physicalThing['@type'] == 'Electronic') {
throw badRequest("Thing linked in reproductionOf cannot be Electronic")
}
if (physicalThing['@type'] == 'DigitalResource') {
throw badRequest("Thing linked in reproductionOf cannot be DigitalResource")
}

def holdingsToCreate = getAtPath(electronicThing, ['@reverse', 'itemOf'], [])
def badHeldBy = holdingsToCreate
Expand All @@ -227,7 +237,11 @@ class ReproductionService {
}

if (isOnline(electronicThing)) {
electronicThing.carrierType = asSet(electronicThing.carrierType) << ONLINE
if (electronicThing['@type'] == 'DigitalResource') {
electronicThing.category = asSet(electronicThing.category) << ONLINE
} else {
electronicThing.carrierType = asSet(electronicThing.carrierType) << ONLINE
}
}

def record = asMap(electronicThing.remove('meta'))
Expand Down
6 changes: 6 additions & 0 deletions rest/src/main/groovy/whelk/rest/api/RefreshAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.ArrayList;
import java.util.List;

import static whelk.FeatureFlags.Flag.INDEX_BLANK_WORKS;
import static whelk.util.Jackson.mapper;

/**
Expand Down Expand Up @@ -110,5 +111,10 @@ void refreshLoudly(Document doc) {
void refreshQuietly(Document doc) {
whelk.getStorage().refreshDerivativeTables(doc);
whelk.elastic.index(doc, whelk);
if (whelk.getFeatures().isEnabled(INDEX_BLANK_WORKS)) {
for (var id : doc.getVirtualRecordIds()) {
whelk.elastic.index(doc.getVirtualRecord(id), whelk);
}
}
}
}
36 changes: 4 additions & 32 deletions rest/src/main/groovy/whelk/rest/api/SearchUtils2.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SearchUtils2 {
SearchUtils2(Whelk whelk) {
this.whelk = whelk;
this.esSettings = new ESSettings(whelk);
this.vocabMappings = new VocabMappings(whelk);
this.vocabMappings = VocabMappings.load(whelk);
}

Map<String, Object> doSearch(Map<String, String[]> queryParameters) throws InvalidQueryException, IOException {
Expand All @@ -34,7 +34,7 @@ Map<String, Object> doSearch(Map<String, String[]> queryParameters) throws Inval
}

QueryParams queryParams = new QueryParams(queryParameters);
AppParams appParams = new AppParams(getAppConfig(queryParameters), queryParams);
AppParams appParams = new AppParams(getAppConfig(queryParameters), whelk.getJsonld());

Query query = Query.init(queryParams, appParams, vocabMappings, esSettings, whelk);

Expand All @@ -59,40 +59,12 @@ private Map<String, Object> getAppConfig(Map<String, String[]> queryParameters)
public Map<String, Object> buildAppConfig(Map<String, Object> findDesc) {
Map<String, Object> config = new LinkedHashMap<>();

Optional.ofNullable((Map<?, ?>) findDesc.get("statistics"))
.map(s -> (List<?>) s.get("sliceList"))
.map(SearchUtils2::buildStatsReprFromSliceSpec)
.ifPresent(statsRepr -> config.put("_statsRepr", statsRepr));

Stream.of("filterAliases", "defaultSiteFilters", "optionalSiteFilters", "relationFilters")
Stream.of("statistics", "filterAliases", "defaultSiteFilters", "optionalSiteFilters", "relationFilters")
.forEach(key ->
Optional.ofNullable(findDesc.get(key))
.ifPresent(filters -> config.put("_" + key, filters))
.ifPresent(filters -> config.put(key, filters))
);

return config;
}

private static Map<String, Object> buildStatsReprFromSliceSpec(List<?> sliceList) {
Map<String, Object> statsRepr = new LinkedHashMap<>();
for (var s : sliceList) {
var slice = ((Map<?, ?>) s);
String key = (String) ((List<?>) slice.get("dimensionChain")).getFirst();
int limit = (Integer) slice.get("itemLimit");
Boolean range = (Boolean) slice.get("range");
String connective = (String) slice.get("connective");
var m = new HashMap<>();
m.put("sort", "count");
m.put("sortOrder", "desc");
m.put("size", limit);
if (range != null) {
m.put("range", range);
}
if (connective != null) {
m.put("connective", connective);
}
statsRepr.put(key, m);
}
return statsRepr;
}
}
25 changes: 22 additions & 3 deletions rest/src/main/groovy/whelk/rest/api/SiteSearch.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package whelk.rest.api;

import com.google.common.io.Files;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import whelk.JsonLd;
import whelk.Whelk;
import whelk.exception.InvalidQueryException;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -70,10 +73,26 @@ protected synchronized void setupApplicationSearchData() {
}
}

protected Map getAndIndexDescription(String id) {
Map data = whelk.loadData(id);
protected Map<?, ?> getAndIndexDescription(String id) {
Map<?, ?> data;

var appsOverride = System.getProperty("xl.test.apps.jsonld");
if (appsOverride != null && !appsOverride.isEmpty()) {
log.info("Using {} for {}", appsOverride, id);
try {
data = mapper.readValue(
Files.asCharSource(new File(appsOverride), StandardCharsets.UTF_8).read(),
Map.class
);
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
data = whelk.loadData(id);
}

if (data != null) {
Map desc = (Map) findInData(data, id);
var desc = (Map<?, ?>) findInData(data, id);
if (desc != null) {
appsIndex.put(id, desc);
return desc;
Expand Down
2 changes: 1 addition & 1 deletion sru/src/main/java/whelk/sru/servlet/SruServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOExce
paramsAsIfSearch.put("_q", q);
paramsAsIfSearch.put("_stats", new String[] { "false" }); // don't need facets
QueryParams qp = new QueryParams(paramsAsIfSearch);
AppParams ap = new AppParams(new HashMap<>(), qp);
AppParams ap = new AppParams(new HashMap<>(), whelk.getJsonld());
Query query = new Query(qp, ap, vocabMappings, esSettings, whelk);
results = query.collectResults();
} catch (InvalidQueryException e) {
Expand Down
2 changes: 1 addition & 1 deletion sru/src/main/java/whelk/sru/servlet/XSearchServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void doGet2(HttpServletRequest req, HttpServletResponse res) throws IOExc
}

QueryParams qp = new QueryParams(paramsAsIfSearch);
AppParams ap = new AppParams(new HashMap<>(), qp);
AppParams ap = new AppParams(new HashMap<>(), whelk.getJsonld());
var results = new Query(qp, ap, vocabMappings, esSettings, whelk).collectResults();

@SuppressWarnings("unchecked")
Expand Down
Loading