Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agents ¶
type Agents struct { Actors common.FlexArray `json:"actors,omitempty"` Adaptors common.FlexArray `json:"adaptors,omitempty"` Authors common.FlexArray `json:"authors,omitempty"` Contributors common.FlexArray `json:"contributors,omitempty"` Coreographers common.FlexArray `json:"coreographers,omitempty"` Developers common.FlexArray `json:"developers,omitempty"` Directors common.FlexArray `json:"directors,omitempty"` Editors common.FlexArray `json:"editors,omitempty"` Featuring common.FlexArray `json:"featuring,omitempty"` Illustrators common.FlexArray `json:"illustrators,omitempty"` Performers common.FlexArray `json:"performers,omitempty"` Photographers common.FlexArray `json:"photographers,omitempty"` Producers common.FlexArray `json:"producers,omitempty"` ProductionCompanies common.FlexArray `json:"productionCompanies,omitempty"` Publishers common.FlexArray `json:"publishers,omitempty"` Readers common.FlexArray `json:"readers,omitempty"` Translators common.FlexArray `json:"translators,omitempty"` }
type AgentsInfo ¶
type AgentsInfo struct { Actors []DisplayAuthority `json:"actors,omitempty"` Adaptors []DisplayAuthority `json:"adaptors,omitempty"` Authors []DisplayAuthority `json:"authors,omitempty"` Contributors []DisplayAuthority `json:"contributors,omitempty"` Coreographers []DisplayAuthority `json:"coreographers,omitempty"` Developers []DisplayAuthority `json:"developers,omitempty"` Directors []DisplayAuthority `json:"directors,omitempty"` Editors []DisplayAuthority `json:"editors,omitempty"` Featuring []DisplayAuthority `json:"featuring,omitempty"` Illustrators []DisplayAuthority `json:"illustrators,omitempty"` Performers []DisplayAuthority `json:"performers,omitempty"` Photographers []DisplayAuthority `json:"photographers,omitempty"` Producers []DisplayAuthority `json:"producers,omitempty"` ProductionCompanies []DisplayAuthority `json:"productionCompanies,omitempty"` Publishers []DisplayAuthority `json:"publishers,omitempty"` Readers []DisplayAuthority `json:"readers,omitempty"` Translators []DisplayAuthority `json:"translators,omitempty"` }
type DebugFlags ¶
type DebugFlags struct { Enabled bool MatchAll bool ScriptParams scorescript.ScoreScriptParams }
type DeduplicationFlags ¶
type DeduplicationFlags struct { DeduplicatePublications bool // false => do not de-duplicate publications (at all, other flags will be ignored) KeepAllMediaTypes bool // false => ignore media types when de-duplicating publications KeepAllSellingPoints bool // false => ignore selling points when de-duplicating publications }
type DisplayAuthority ¶
type Images ¶
type Images struct { Small string `json:"small,omitempty"` Medium string `json:"medium,omitempty"` Large string `json:"large,omitempty"` Largest string `json:"largest,omitempty"` HasAllSizes bool `json:"hasAllSizes"` UseFallback bool `json:"useFallback"` FallbackColor string `json:"fallbackColor"` }
type IndexedPublication ¶
type IndexedPublication struct {
Publication
}
type OtherPublications ¶
type ProcessedPublication ¶
type ProcessedPublication struct { Publication Images Images `json:"images"` Score float64 `json:"score,omitempty"` ScoreExplanation string `json:"scoreExplanation,omitempty"` }
type Publication ¶
type Publication struct { // Obligatoriske felt: ID string `json:"id"` URI string `json:"uri"` RecordID string `json:"recordId"` MediaType string `json:"mediaType"` MainTitle string `json:"mainTitle"` Agents Agents `json:"agents"` AgentsInfo AgentsInfo `json:"agentsInfo"` Work Work `json:"work"` OtherPublications OtherPublications `json:"otherPublications"` Created string `json:"created"` Deleted bool `json:"deleted"` TitleAll common.FlexArray `json:"titleAll"` AgeLimit int `json:"ageLimit"` // Ikke obligatoriske felt: CoverImage string `json:"coverImage,omitempty"` Various common.FlexArray `json:"various,omitempty"` // catch-all searchable notes and such WritingSystem string `json:"writingSystem,omitempty"` Subtitle string `json:"subtitle,omitempty"` PartTitle string `json:"partTitle,omitempty"` PartNumber string `json:"partNumber,omitempty"` PartNumberNumeric *int `json:"partNumberNumeric,omitempty"` UntranscribedTitle string `json:"untranscribedTitle,omitempty"` PublicationYear *int `json:"publicationYear,omitempty"` IDs common.FlexArray `json:"ids,omitempty"` Formats common.FlexArray `json:"formats,omitempty"` Languages common.FlexArray `json:"languages,omitempty"` LocationClassNumber common.FlexArray `json:"locationClassNumber,omitempty"` ShelfMark string `json:"shelfMark"` FullTitle string `json:"fullTitle"` // syntetic SellingPoint string `json:"sellingPoint,omitempty"` // syntetic HiddenSearchables common.FlexArray `json:"hiddenSearchables,omitempty"` Contributors common.FlexArray `json:"allAgents,omitempty"` Series common.FlexArray `json:"series,omitempty"` WorkSeriesInfo []DisplayAuthority `json:"workSeriesInfo,omitempty"` SerialInfo []DisplayAuthority `json:"serialInfo,omitempty"` DisplaySeries []Series `json:"displaySeries,omitempty"` // FIXME Not in use internally, can we delete it? PublishedBy common.FlexArray `json:"publishedBy,omitempty"` Parts common.FlexArray `json:"parts,omitempty"` Subtitles common.FlexArray `json:"subtitles,omitempty"` NumberOfPagesCosmetic *int `json:"numberOfPagesCosmetic,omitempty"` // a publication may have multiple numberOfPages, this is a random one of them used for cosmetic purposes only Actor common.FlexArray `json:"actor,omitempty"` Author common.FlexArray `json:"author,omitempty"` Choreographer common.FlexArray `json:"choreographer,omitempty"` Composer common.FlexArray `json:"composer,omitempty"` Conductor common.FlexArray `json:"conductor,omitempty"` Contributor common.FlexArray `json:"contributor,omitempty"` Director common.FlexArray `json:"director,omitempty"` Editor common.FlexArray `json:"editor,omitempty"` Illustrator common.FlexArray `json:"illustrator,omitempty"` Lyricist common.FlexArray `json:"lyricist,omitempty"` Musicalarranger common.FlexArray `json:"musicalArranger,omitempty"` Photographer common.FlexArray `json:"photographer,omitempty"` Performer common.FlexArray `json:"performer,omitempty"` Producer common.FlexArray `json:"producer,omitempty"` Reader common.FlexArray `json:"reader,omitempty"` Scriptwriter common.FlexArray `json:"scriptWriter,omitempty"` Translator common.FlexArray `json:"translator,omitempty"` HomeBranches json.RawMessage `json:"homeBranches"` // Branches which have at least one item of biblio AvailableBranches json.RawMessage `json:"availableBranches"` // Branches which have at least one item of biblio and which is available Locations json.RawMessage `json:"locations"` // Locations, grouped by mediatype, which have at least one item of biblio available NumItems uint32 `json:"numItems"` // Number of total items on biblio ReservesByYear json.RawMessage `json:"reservesByYear"` // reserves on biblio grouped by year IssuesByYear json.RawMessage `json:"issuesByYear"` // issues on biblio grouped by year IssuesTotal int `json:"issuesTotal"` // calculated here (could be summed in koha db query when JSON summing is available) KohaPopularity float64 `json:"kohaPopularity"` // popularity according to Koha Likes int `json:"likes"` LastLiked string `json:"lastLiked,omitempty"` // ES does not like empty strings mapped as dates, so omit if empty LikedBy common.FlexArray `json:"likedBy"` Recommended bool `json:"recommended"` Recommendations []json.RawMessage `json:"recommendations"` }
type SearchPublicationClient ¶
type SearchPublicationClient interface { SearchByQuery(params url.Values, size int) SearchResults SearchByIDs(ids []string, params url.Values) SearchResults SearchByWorkUris(uris []string, params url.Values) SearchResults SearchBySubjectUris(uris []string, params url.Values) SearchResults }
func NewSearchPublicationClient ¶
func NewSearchPublicationClient(esUrl *url.URL) (SearchPublicationClient, error)
type SearchResults ¶
type SearchResults struct { Filters []filter `json:"filters"` Hits []ProcessedPublication `json:"hits"` TotalHits int64 `json:"totalHits"` NumHitsRemoved int64 `json:"numHitsRemoved"` }
type Work ¶
type Work struct { // Obligatoriske felt: ID string `json:"id"` URI string `json:"uri"` MainTitle string `json:"mainTitle"` Type string `json:"type"` Agents Agents `json:"agents"` AgentsInfo AgentsInfo `json:"agentsInfo"` FictionNonfiction common.FlexArray `json:"fictionNonfiction"` // Ikke obligatoriske felt: MainEntry string `json:"mainEntry,omitempty"` MainEntryNationalities common.FlexArray `json:"mainEntryNationalities,omitempty"` MainEntryInfo *DisplayAuthority `json:"mainEntryInfo,omitempty"` PublicationYear *int `json:"publicationYear,omitempty"` Biography common.FlexArray `json:"biography,omitempty"` LiteraryForms common.FlexArray `json:"literaryForms,omitempty"` Genres common.FlexArray `json:"genres,omitempty"` Subjects common.FlexArray `json:"subjects,omitempty"` SubjectsInfo []DisplayAuthority `json:"subjectsInfo,omitempty"` Audiences common.FlexArray `json:"audiences,omitempty"` CompositionTypes common.FlexArray `json:"compositionTypes,omitempty"` CountriesOfOrigin common.FlexArray `json:"countriesOfOrigin,omitempty"` DeweyNumbers common.FlexArray `json:"deweyNumbers,omitempty"` Languages common.FlexArray `json:"languages,omitempty"` Instruments common.FlexArray `json:"instruments,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.