annosearch 0.2.0 → 0.2.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
@@ -1,7 +1,45 @@
1
1
 
2
2
  # Annotation Search
3
3
 
4
- AnnoSearch uses [Quickwit](https://quickwit.io) as its backend database to efficiently index and query [W3C Web Annotation](https://www.w3.org/TR/annotation-model/) data. AnnoSearch can load data directly from [IIIF](https://iiif.io/) resources and web annotation servers such as [Miiify](https://github.com/nationalarchives/miiify).
4
+ AnnoSearch uses [Quickwit](https://quickwit.io) as its backend database to efficiently index and query [W3C Web Annotation](https://www.w3.org/TR/annotation-model/) data, leveraging a declarative approach to simplify ingestion and management. AnnoSearch can ingest data directly from [IIIF](https://iiif.io/) resources and web annotation servers such as [Miiify](https://github.com/nationalarchives/miiify) and make it available to IIIF viewers through the [IIIF Content Search 2.0 API](https://iiif.io/api/search/2.0/).
5
+
6
+ ## Tutorial
7
+
8
+ We first need to create an index.
9
+ ```
10
+ ❯ annosearch init --index cookbook
11
+ Index created successfully
12
+ ```
13
+ We can now load the index with the annotations referenced in a IIIF manifest.
14
+ ```
15
+ ❯ annosearch load --index cookbook --type Manifest --uri https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/manifest.json
16
+ Loading Manifest from https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/manifest.json into index cookbook
17
+ |+|
18
+ ```
19
+ After Quickwit finishes ingesting and indexing the data we can perform a search.
20
+ ```
21
+ ❯ annosearch search --index cookbook --query brunnen
22
+ {
23
+ "@context": "http://www.w3.org/ns/anno.jsonld",
24
+ "id": "http://localhost:3000/cookbook/search?q=brunnen&page=0",
25
+ "type": "AnnotationPage",
26
+ "startIndex": 0,
27
+ "items": [
28
+ {
29
+ "body": {
30
+ "format": "text/plain",
31
+ "language": "de",
32
+ "type": "TextualBody",
33
+ "value": "Göttinger Marktplatz mit Gänseliesel Brunnen"
34
+ },
35
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2/anno-1",
36
+ "motivation": "commenting",
37
+ "target": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1",
38
+ "type": "Annotation"
39
+ }
40
+ ]
41
+ }
42
+ ```
5
43
 
6
44
  ## Usage
7
45
 
@@ -48,7 +86,7 @@ Perform a search on a specified index.
48
86
  annosearch search --index <index-id> --query <search-query> [--page <page-number>] [--motivation <motivation>] [--date <date-ranges>] [--user <users>]
49
87
  ```
50
88
 
51
- - `query`: The search query string.
89
+ - `query`: A space separated list of search query terms.
52
90
  - `page`: Optional page number (defaults to 0).
53
91
  - `motivation`: Optional space separated list of motivation terms.
54
92
  - `date`: Optional space separated list of date ranges.
@@ -2,18 +2,14 @@ version: "0.8"
2
2
 
3
3
  doc_mapping:
4
4
  mode: dynamic
5
- field_mappings:
6
- - name: body
7
- type: object
8
- field_mappings:
9
- - name: value
10
- type: text
11
- - name: motivation
12
- type: text
13
- - name: created
14
- type: datetime
15
- fast: true
16
-
5
+ dynamic_mapping:
6
+ indexed: true
7
+ stored: true
8
+ tokenizer: default
9
+ record: position
10
+ expand_dots: true
11
+ fast: true
12
+
17
13
 
18
14
 
19
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "annosearch",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"