prez-lib 4.3.0 → 4.3.1

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.
package/README.md CHANGED
@@ -32,3 +32,19 @@ const store = new RDFStore();
32
32
  store.load(data);
33
33
  const data = store.getItem();
34
34
  ```
35
+
36
+ ## Search parser modes
37
+
38
+ `search()` defaults to the existing flat Prez search result shape.
39
+
40
+ The parser mode is strict: the mode you configure must match the backend search model. `prez-lib` does not do compatibility fallbacks between the flat and Jena Lucene SHACL shapes.
41
+
42
+ To opt into Jena Lucene SHACL nested matches, pass the parser mode explicitly:
43
+
44
+ ```typescript
45
+ import { search } from "prez-lib";
46
+
47
+ const results = await search("https://example.com", "/search?q=rock", {
48
+ parserMode: "jena-lucene-shacl",
49
+ });
50
+ ```
package/dist/consts.d.ts CHANGED
@@ -15,6 +15,7 @@ export declare const PREZ_PREDICATES: {
15
15
  searchResultPredicate: string;
16
16
  searchResultURI: string;
17
17
  searchResultMatch: string;
18
+ hasSearchMatch: string;
18
19
  hasChildren: string;
19
20
  facetCount: string;
20
21
  facetName: string;