Skip to content

Commit

Permalink
0.3.5 Add snippets field to metadata model (#15)
Browse files Browse the repository at this point in the history
* Add snippets field to metadata model

* Bump version to 0.3.5
  • Loading branch information
latonv committed Aug 24, 2022
1 parent f189e1e commit bfbb495
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@internetarchive/search-service",
"version": "0.3.4",
"version": "0.3.5",
"description": "A search service for the Internet Archive",
"license": "AGPL-3.0-only",
"main": "dist/index.js",
Expand Down
6 changes: 6 additions & 0 deletions src/models/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ export class Metadata {
: undefined;
}

@Memoize() get snippets(): StringField | undefined {
return this.rawMetadata?.snippets
? new StringField(this.rawMetadata.snippets)
: undefined;
}

@Memoize() get source(): StringField | undefined {
return this.rawMetadata?.source
? new StringField(this.rawMetadata.source)
Expand Down

0 comments on commit bfbb495

Please sign in to comment.