comparefile

package
v0.2.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package comparefile implements the core of span-compare-file: it compares ISIL (institution) counts between a local file (solr export format JSONL) and a Solr index, emitting a table with ISIL, file count, index count, difference and percentage change.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg Config, r io.Reader, facet FacetFunc, w io.Writer) error

Run counts ISILs in the input stream, queries the index via facet, and writes the comparison table to w.

Types

type Config

type Config struct {
	Server    string
	SourceID  string
	Textile   bool
	ShowAll   bool
	ShowEmpty bool
	BatchSize int
}

Config holds the tunables for a compare-file run.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration.

type FacetFunc

type FacetFunc func(query, facetField string) (solrutil.FacetMap, error)

FacetFunc returns per-value counts for a facet field given a query. It abstracts the Solr index so Run can be tested without a live server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL