aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorArun Isaac2020-02-15 19:25:30 +0530
committerArun Isaac2020-02-15 19:34:29 +0530
commit9a1bfc6980fb492149ad795330f0d5b17a3b59cf (patch)
tree54a017fb98582e2c5f1160c08411df58aaa60e98 /examples
downloadguile-xapian-9a1bfc6980fb492149ad795330f0d5b17a3b59cf.tar.gz
guile-xapian-9a1bfc6980fb492149ad795330f0d5b17a3b59cf.tar.lz
guile-xapian-9a1bfc6980fb492149ad795330f0d5b17a3b59cf.zip
First commit.
Diffstat (limited to 'examples')
-rw-r--r--examples/100-objects.sexp100
-rw-r--r--examples/index.scm48
-rw-r--r--examples/search.scm50
3 files changed, 198 insertions, 0 deletions
diff --git a/examples/100-objects.sexp b/examples/100-objects.sexp
new file mode 100644
index 0000000..addfd38
--- /dev/null
+++ b/examples/100-objects.sexp
@@ -0,0 +1,100 @@
+(("Ansonia Sunwatch (pocket compass dial)" "Ansonia Sunwatch (pocket compas dial)" "1974-100")
+ ("Model of train of wheels used in a clock (full size) with pair of vanes and base" "Model of train of wheels used in a clock (full size) with pa" "1883-74")
+ ("Ship's log-glass in wooden mount. 14 secs. Abbot Horne No.22. Type B" "Ship's log-glass in wooden mount. 14 secs. Abbot Horne No.22" "1953-404")
+ ("Watch with Chinese duplex escapement" "Watch with Chinese duplex escapement" "1970-377")
+ ("\"Ever Ready\" ceiling clock" "\"Ever Ready\" ceiling clock" "1979-5")
+ ("Ivory diptych dial by Jasper Milner" "Ivory diptych dial by Jasper Milner" "1938-371")
+ ("Dead-beat escapement model (full size) with wooden stand." "Dead-beat escapement model (full size) with wooden stand." "1883-64")
+ ("Large single sand-glass in wooden mount, 21 1/2\" long x 11\" diameter. Abbot Horne No.111. Type A" "Large single sand-glass in wooden mount, 21 1/2\" long x 11\"" "1953-448")
+ ("Copy of a Dwerrihouse skeleton clock with coup-perdu escapement. Made by Thwaites and Reed, London, England, 1973. No. 88 of a limited edition of 100." "Copy of a Dwerrihouse skeleton clock with coup-perdu escape" "1985-438")
+ ("Synchronome free pendulum clock, patented by F. Hope-Jones in 1935, in oak case, lacks both pendulums, with weight (probably not original)" "Synchronome free pendulum clock, patented by F. Hope-Jones i" "1985-475")
+ ("\"Timetrunk\" by Hines and Co., Glasgow (a sandglass for timing telephone calls)" "\"Timetrunk\" by Hines and Co., Glasgow (a sandglass for timin" "1985-770")
+ ("Electric clock kit in original box and a similar clock which has been assembled, by EXA, Belgium, 1931-1939. Support stand broken on finished dock. Lid of box containing finished clock missing." "Assembled and unassembled EXA electric clock kit" "1985-1202")
+ ("Watch timer by P.L. Instruments Ltd., Welwyn Garden City; with tuning fork standard and spark printer" "Watch timer by P" "1985-1538")
+ ("Horizontal sundial in bronze dated, 1551 with initials W.B. (? William Buckley). Possibly by Thomas Gemini" "Horizontal sundial in bronze dated, 1551 with initials W.B." "1985-1389")
+ ("Ingersoll \"Dan Dare\" automaton pocket watch with pin-pallet lever escapement. The dial shows a helmeted Dan Dare holding a ray gun, with a monster approaching. The emblem of the \" Eagle\" children's comic is impressed in the back of case." "Ingersoll \"Dan Dare\" automaton pocket watch with pin-pallet" "1985-1914")
+ ("Copy of the gearing of the Byzantine sundial-calendar (1983-1393) three times true size, conjecturally completed, in perspex and brass" "Copy of the gearing of the Byzantine sundial-calendar (1983-" "1985-172")
+ ("Column dial by Henry Robert, Horloger, au Palais Royal, paper on wood, early 19th century" "Column dial by Henry Robert, Horloger, au Palais Royal, pape" "1955-303")
+ ("Solar/Sidereal verge watch with epicyclic maintaining power by James Green, London, no. 5969, in silver pair case hallmarked 1776, believed to be the earliest English watch to indicate solar and sidereal time with seconds." "Solar/Sidereal verge watch with epicyclic maintaining power" "1987-1145")
+ ("Photograph (portrait) of Dent's chronometer with glass balance spring, taken by the School of Military Engineering, Chatham, Kent, England, 1870-1876" "Photograph of Dent's chronometer with glass balance spring" "1876-19")
+ ("Copy of the drawing representing Galileo's idea of the application of the pendulum to the clock, 1659." "Drawing Representing Galileo's Proposal for the Application of the Pendulum to the Clock, 1659, copy" "1876-70")
+ ("Ancient stone sundial - plaster cast" "Ancient stone sundial - plaster cast" "1876-322")
+ ("Bashforth's Chronograph with screens, frame and weights, invented c. 1865." "Bashforth's Chronograph with screens, frame and weights, inv" "1876-377")
+ ("Description of the Chronograph, given by Mr. Bashforth (Note:- may be accepted as presented with the chronograph)" "Description of the Chronograph, given by Mr" "1876-950")
+ ("Clock with gravity escapement constructed by Mr. J. M. Bloxam, 1845-1855." "Regulator Clock with Gravity Escapement" "1879-32")
+ ("Universal ringdial brass (part silvered), diameter 8 1/2\", brassplate 3 3/8 In. square, French, 18th century" "Universal ringdial brass (part silvered), diameter 8 1/2\", b" "1880-29")
+ ("Sundial and compass with perpetual calendar and lunar circles. Brass, part silvered, 6 1/8 x 5 3/8-inches. By Christopher Kohler, Dresden, Germany, 1677. Glass of compass box cracked, compass needle missing." "Sundial and compass with perpetual calendar and lunar circles" "1880-30")
+ ("Sundial, Brass, gromon and heads of levelling screws gilt. Plate 8 in. by 6 7/8 in. Invented by Julien le Roy. Made by Langlois, French. 1730-1751" "Sundial" "1880-31")
+ ("Sundial with separate compass. Brass gilt 8 5/8\" by 7 1/2\". Compass plate 3in. square. By Godfried Weiss, German, late 17th or early 18th century" "Sundial with separate compass. Brass gilt 8 5/8\" by 7 1/2\"." "1880-34")
+ ("Sundial and compass, brass gilt, dial plate 10 3/4in. by 8 3/4in. Engraved \"Franz Antoni Knitl Linz, fecit\". Austrian, late 17th or early 18th century" "Sundial and compass, brass gilt, dial plate 10 3/4in. by 8 3" "1880-35")
+ ("A universal equinoctial sundial signed \"Carl Von Mandern fecit Hafnia\" (Copenhagen), 18th century" "A universal equinoctial sundial signed \"Carl Von Mandern fec" "1985-2001")
+ ("Portable universal equinoctial sundial, in brass, signed \"A Ryther * Fecit * 1588\" with inscription \"WILLIAM PAWLEY OWETH THIS SAME IN ANNO DOMINI 1588\". Diameter 50mm. With compass needle (not original)." "Portable universal equinoctial sundial, in brass, signed \"A" "1985-2021")
+ ("Glass bowl in the shape of an ancient Egyptian water-clock, 1940-1965" "Glass Bowl Replicating an Egyptian Water Clock, 1940-1965" "1969-479")
+ ("A device by Favag of Neuchatel which enables a stop watch to be operated by an electric signal, 1961" "A device by Favag of Neuchatel which enables a stop watch to" "1986-516")
+ ("\"Ticket\" clock by Ever-Ready in mahogany case with reeded brass pillars, c.1915" "\"Ticket\" clock by Ever-Ready in mahogany case with reeded br" "1986-279")
+ ("Synchronome master clock (No.6133), fitted with a seconds switch and a centre seconds slave dial. With a battery charger" "Synchronome master clock (No" "1986-1153")
+ ("'Tri-Compax' calendar chronograph wristwatch in gold case, by Universal, Geneva, Switzerland, 1960-1986." "Universal 'Tri-Compax' chronographic wrist watch" "1986-91")
+ ("\"Silent Triangle\" 1/2 minute impulse dial movement by Gents of Leicester, patented 1925" "\"Silent Triangle\" 1/2 minute impulse dial movement by Gents" "1986-1553")
+ ("Dipleidoscope, signed Plossl In Wien" "Dipleidoscope, signed Plossl In Wien" "1986-1695")
+ ("Electric clock of the Bain type" "Electric clock of the Bain type" "1987-213")
+ ("Millisecond Stopclock type TSA3314 by Venner Electronics Limited, 1963" "Millisecond Stopclock type TSA3314 by Venner Electronics Lim" "1987-238")
+ ("Frequency and time measuring instrument type TSA3436 by Venner Electronics Limited, 1965 with cover" "Frequency and time measuring instrument type TSA3436 by Venn" "1987-239")
+ ("MKV11b quartz timer by Hurd-Brown Limited, Bolton c.1955" "MKV11b quartz timer by Hurd-Brown Limited, Bolton c.1955" "1987-241")
+ ("Loughborough-Hayes automatic timing apparatus. Used by the RAC to time motor sporting events from 1936 to 1962. Comprising; 1) Rythmic starter motor and lights. 2) Start and finish photocells. 3) 2 `hockey stick' switches. 4) Tuning fork. 5) Amplifier for maintaining the tuning fork and driving the chronography. 6) Chronograph. 7) Control box. 8) Connecting wires and loudspeaker" "Loughborough-Hayes automatic timing apparatus. Used by the R" "1987-240")
+ ("Two-dial clock by the Self-Winding Clock Co; as used on the London underground" "Two-dial clock by the Self-Winding Clock Co; as used on the" "1987-294")
+ ("Master clock of the \"Silent Electric\" type made by the Magneto Time division of the British Vacuum Cleaner and Engineering Co. Ltd." "Master clock of the \"Silent Electric\" type made by the Magne" "1987-295")
+ ("Model by Dent of mechanism for setting hands and winding up a keyless watch" "Model by Dent of mechanism for setting hands and winding up" "1883-68")
+ ("Model of Swiss lever escapement, and clockwork winding key" "Model of Swiss lever escapement, and clockwork winding key" "1984-633")
+ ("Synchronous mains electric clock of the non self-starting type by Ferranti with 24 hour alarm and illuminated dial c.1936" "Synchronous mains electric clock of the non self-starting ty" "1984-1143")
+ ("Digital wristwatch with \"jumping hour\", lever escapement, Swiss, c.1932" "Digital wristwatch with \"jumping hour\", lever escapement, Sw" "1984-1275")
+ ("Quartz Analogue \"no battery\" wristwatch by Pulsar Quartz (CAL. V103), 1984, in presentation box, powered by an amorphous silicon photocell with reserve power provided by a capacitor." "Quartz Analogue \"no battery\" wristwatch by Pulsar Quartz (CA" "1984-1415")
+ ("Analogue quartz clock with voice controlled alarm by Braun, 1984, type 47763/AB30vs with original packing and instructional manual, supplied by Selfridges" "Analogue quartz clock with voice controlled alarm by Braun," "1984-1611")
+ ("Reconstruction of Dondi clock, which represents a working model of the universe. Its movements, dials and calender are kept in motion by the weight driven clock, 1974" "Reconstruction of Dondi's Astronomical Clock, 1974" "1974-386")
+ ("Electric clock of the bulle type probably made by The British Horo Electric Company, 1930' s" "Electric clock of the bulle type probably made by The Britis" "1984-1688")
+ ("Sol-horometer, by Pilkington and Gibbs, Preston, design patented in 1911" "Sol-horometer, by Pilkington and Gibbs, Preston, design pate" "1985-73")
+ ("Altitude sundial, in silver, for latitude 51°30 secs. (London), signed Humfray Colle, in original tooled leather case, by Humfrey Cole, London, England, 1568-1590 (see note)." "Silver altitude sundial in leather case" "1985-100")
+ ("Single sandglass in 4 pillared wood mount, running time 15 1/2 minutes, Horne Type B, height 138mm." "Single sandglass in 4 pillared wood mount, running time 15 1" "1907-153")
+ ("Electric clock by Alexander Bain, in case" "Electric clock by Alexander Bain, in case" "1909-135")
+ ("The \"Empire\" clock, to show the time at various longitudes, with parts" "The \"Empire\" clock, to show the time at various longitudes," "1909-199")
+ ("Electrically operated clock controller by J. Lund, United Kingdom, 1876-1905." "Electrically operated clock controller" "1909-474")
+ ("Sand glass (old sermon glass)" "Sand glass (old sermon glass)" "1911-209")
+ ("Van der Plancke master clock" "Van der Plancke master clock" "1912-224")
+ ("Van der Plancke impulse dial mechanism" "Van der Plancke impulse dial mechanism" "1912-225")
+ ("Peyer Favarger, Hipp dial movement" "Peyer Favarger, Hipp dial movement" "1912-228")
+ ("Morse electrical clock, dial mechanism" "Morse electrical clock, dial mechanism" "1912-230")
+ ("Electric time piece with hands but without dial (no pendulum)" "Electric time piece with hands but without dial (no pendulum" "1913-564")
+ ("Sundial, brass, baseplate 7 1/4in. by 6in., late 17th century. Engraved (M. Kolwein fecit Vienna 48 Gral 14 min)" "Sundial, brass, baseplate 7 1/4in. by 6in., late 17th centur" "1880-40")
+ ("Nocturnal, brass gilt, diameter 2 3/4in. Italian, early 17th century" "Nocturnal, brass gilt, diameter 2 3/4in. Italian, early 17th" "1880-42")
+ ("Perpetual Calendar, brass scroll-work chased. Revolving plates silvered. Length 5 3/8-inches. Made in France, 1801-1830." "Ornate brass Perpetual Calendar" "1880-44")
+ ("Sundial, brass, originally silvered, base plate 9in. by 6 7/8in. Engraved Joseph Modestin in Chindin (Bohemia), German, 18th century. Sights of alidate and one small brass screen missing" "Sundial, brass, originally silvered, base plate 9in. by 6 7/" "1880-45")
+ ("Sundial with compass, brass gilt, silvered circles. Diameter 6in. Engraved No.116 Se 61812, Toda M. Uda Rymoe. German, late 17th century (cover glass of compass box cracked)" "Sundial with compass, brass gilt, silvered circles. Diameter" "1880-46")
+ ("Clock with pendulum showing action of snail plate and repeater." "Clock with pendulum showing action of snail plate and repeat" "1883-95")
+ ("Perpetual calendar, gilt metal, 2½ x 9/16-inches, Germany, 1701-1800." "German Perpetual Calendar in gilt metal" "1883-120")
+ ("Universal pocket sundial, silver with gilt hour ring and pin gnomon, diameter 1¾-inches, by Johann Martin, Augsburg, Germany, 1701-1721 (see note)." "Universal pocket sundial" "1883-121")
+ ("Sundial, made as a locket, gilt metal, part silver, 1¾-inches square, by Juan Cocart, madrid, Spain, 1596 (see note)." "Sundial, made as a locket, gilt metal, part silver" "1883-122")
+ ("Column sun-dial, gilt bronze (639-65). 9in. high, diam. of pillar = 2in. V and A. Museum Reg. Imperfect, no compass or cover glass, 1531-1570" "Column Sundial in Gilt Bronze, Unsigned, 1531-1570" "1883-124")
+ ("Cubical sun-dial (30-81 V. and A. M. Reg), in wood, painted in distemper, Italian, 1550-1570." "Italian Cubical Sundial, Unsigned, 1550-1570" "1883-128")
+ ("Column sun-dial (21-1879 V and A. M. Reg), height 9 1/8inches, 1601-1700, gilt metal, on square base, surmounted by figure of dragon" "Column Sundial with Dragon Design, Unsigned, 1601-1700" "1883-132")
+ ("Pocket sun-dial, brass, by Nicolas Bion, Paris, France, 1680-1733." "Brass sundial" "1883-137")
+ ("Sun-dial Brass, French (23-79 V. and A. M. Reg), late 17th or early 18th century with four levelling screws (compass needle and gloves missing)" "Sun-dial Brass, French (23-79 V. and A. M. Reg), late 17th o" "1883-139")
+ ("Tablet sun-dial, gilt metal, string gnomon, 3 3/8 x 2 3/8-inches, Germany, 1597. For use at latitude 50°. Engraved on base with circular tables of Julian and Gregorian epacts 1597-1615, and lunar circle. Bead threaded onto gnomon allows determination of planetary or Jewish hours (see note)." "Tablet sun-dial in gilt metal" "1883-140")
+ ("Bistoury, curved and probe-ended, steel and ebony, by Eggington of Manchester, 19th century" "" "A616989")
+ ("Clock made by Benjamin Vulliamy for His Majesty George III, and used in his Observatory at Kew. In polished mahogany case, with a side plate and glass top for case" "Movement of regulator clock by Vulliamy, about 1760" "1884-79")
+ ("Original eight day clock by Harrison, date 1715, wheel work mostly of wood. With correspondence concerning Harrison clocks" "Harrison's eight-day wooden clock movement, 1715." "1884-80")
+ ("Horizontal, magnetic sundial, silvered, in brass case, diameter 3.75-inches, dial made in England, 1801-1900 (see note)." "Magnetic sundial in brass case" "1887-13")
+ ("Boulenges chronograph for the determination of the velocity of projectiles, with zinc tubes for records, includes additional zinc tubes and an illustration" "Boulenges chronograph for the determination of the velocity" "1887-27")
+ ("Model of chronometer escapement, for use with a projecting latern, made by Dent, 1950-1883. Represents the detent chronometer escapement, invented by Thomas Earnshaw 1777-1787. This escapement was typically used in marine chronometers." "Model representing Earnshaw's detent chronometer escapement, 1950-1883" "1883-67")
+ ("Sundial, Gnomon fixed on a cannon over touch hole of which a lens is fixed. French, 1782, of cast bronze. Base 8 1/2\" square" "Sundial, Gnomon fixed on a cannon over touch hole of which a" "1880-52")
+ ("Tablet azimuth sundial, with compass, engraved. Ivory, 3¼ x 2½-inches, by Charles (Carolus) Bloud, Dieppe, France, 1650-1686. With equatorial dial in the upper leaf (see note)." "Bloud sundial" "1880-53")
+ ("Tablet sundial with compass, ivory with coloured engraving, 4¼ x 2½-inches, Germany, 1648 (see note)." "Diptych dials" "1880-54")
+ ("Tablet sundial with compass, engraved ivory, highly decorative with religious images, 3 x 2¾-inches, Germany, 1601-1700. With subsidiary dial (see note)." "Tablet sundial of ivory" "1880-55")
+ ("Model showing the first idea of the application of the pendulum to the clock designed by Galileo in 1642, made his son Vincenzo in 1649 and illustrated by Vincenzo Viviani, Italy. This model is by Eustachio Porcellotti, Florence, Italy, 1883." "Pendulum clock designed by Galileo in 1642 and made by his son in 1649, model." "1883-29")
+ ("Model of recoil escapement of clock, with pendulum and wooden stand, having a hollow cylindrical bob, marked \"Mech Lab 100\"" "Model of recoil escapement of clock, with pendulum and woode" "1883-54")
+ ("Model by Dent of Graham's cylinder escapement for use with lantern, 1850-1883" "Model of Graham's Cylinder Escapement, 1850-1883" "1883-65")
+ ("Model by Dent of lever escapement for use with lantern, 1850-1883" "Model of a Lever Escapement , 1850-1883" "1883-66")
+ ("1/4-repeater verge by Lieutand a Aix, in silver case, London, hall mark 1803, donated by Evan Roberts in 1916" "1/4-repeater in case" "1916-229")
+ ("Clock with Hipp pendulum (an electric driven clock with Hipp butterfly escapement) with a door of back of case" "Clock with Hipp pendulum (an electric driven clock with Hipp" "1913-567")
+ ("Subsidiary electric clock (no weight, hands, pulley and suspension spring) by Alexander Bain, United Kingdom, 1875-1885." "Bain's subsidiary electric clock" "1913-580")
+ ("'Pond' electric clock (movement only, no dial), by Self Winding Clock Company, New York, United States, 1905-1913." "'Pond' electric clock movement (no dial)" "1913-581")
+ ("15th Century Iron striking clock with 17th century escapement and other later modifications (on stand). (Arrangement for driving hands incomplete, no driving weights) Including count wheel" "15th Century Iron striking clock with 17th century escapemen" "1914-453")
+ ("Wooden pocket sundial. Horizontal and vertical dials for use at various latitudes on moving style, Germany, 1776-1800 (see note)." "Wooden pocket sundial for use at various latitudes" "1914-887"))
diff --git a/examples/index.scm b/examples/index.scm
new file mode 100644
index 0000000..396df7c
--- /dev/null
+++ b/examples/index.scm
@@ -0,0 +1,48 @@
+;;; guile-xapian --- Guile bindings for Xapian
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guile-xapian.
+;;;
+;;; guile-xapian is free software: you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation, either version 2 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; guile-xapian is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with guile-xapian. If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(use-modules (ice-9 match)
+ (srfi srfi-26)
+ (xapian xapian))
+
+(define (index datapath dbpath)
+ (call-with-writable-database dbpath
+ (lambda (db)
+ (for-each
+ (lambda (record)
+ (match record
+ ((description title identifier)
+ (let* ((idterm (string-append "Q" identifier))
+ (doc (make-document #:data (call-with-output-string (cut write record <>))
+ #:terms `((,idterm . 0))))
+ (term-generator (make-term-generator #:stem (make-stem "en")
+ #:document doc)))
+ (index-text! term-generator title #:prefix "S")
+ (index-text! term-generator description #:prefix "XD")
+ (index-text! term-generator title)
+ (increase-termpos! term-generator)
+ (index-text! term-generator description)
+ (replace-document! db idterm doc)))))
+ (call-with-input-file datapath read)))))
+
+(match (command-line)
+ ((_ datapath dbpath)
+ (index datapath dbpath))
+ ((program . _)
+ (format (current-error-port) "Usage: ~a DATAPATH DBPATH~%" program)))
diff --git a/examples/search.scm b/examples/search.scm
new file mode 100644
index 0000000..4b58313
--- /dev/null
+++ b/examples/search.scm
@@ -0,0 +1,50 @@
+;;; guile-xapian --- Guile bindings for Xapian
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guile-xapian.
+;;;
+;;; guile-xapian is free software: you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation, either version 2 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; guile-xapian is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with guile-xapian. If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(use-modules (ice-9 format)
+ (ice-9 match)
+ (xapian xapian))
+
+(define (get-title record)
+ (match record
+ ((description title identifier) title)))
+
+(define* (search dbpath querystring #:key (offset 0) (pagesize 10))
+ (call-with-database dbpath
+ (lambda (db)
+ (let ((query (parse-query querystring
+ #:stemmer (make-stem "en")
+ #:prefixes '(("title" ."S")
+ ("description" . "XD")))))
+ (mset-fold (lambda (item _)
+ (format #t "~a: #~3,'0d ~a~%"
+ (mset-item-rank item)
+ (mset-item-docid item)
+ (get-title
+ (call-with-input-string
+ (document-data (mset-item-document item))
+ read))))
+ #f
+ (enquire-mset (enquire db query) offset pagesize))))))
+
+(match (command-line)
+ ((_ dbpath . query-terms)
+ (search dbpath (string-join query-terms)))
+ ((program . _)
+ (format (current-error-port) "Usage: ~a DBPATH QUERYTERM...~%" program)))