3
require File.dirname(__FILE__) + "/../../test_helper"
6
class IndexWriterTest < Test::Unit::TestCase
8
include Ferret::Analysis
11
@dir = Ferret::Store::RAMDirectory.new
12
fis = FieldInfos.new()
13
fis.create_index(@dir)
21
wlock = @dir.make_lock(IndexWriter::WRITE_LOCK_NAME)
22
clock = @dir.make_lock(IndexWriter::COMMIT_LOCK_NAME)
23
assert(! wlock.locked?)
24
assert(! clock.locked?)
25
iw = IndexWriter.new(:dir => @dir, :create => true)
26
assert(@dir.exists?("segments"))
29
assert(@dir.exists?("segments"))
30
assert(! wlock.locked?)
31
assert(! clock.locked?)
35
iw = IndexWriter.new(:dir => @dir,
36
:analyzer => StandardAnalyzer.new(),
38
iw << {:title => "first doc", :content => ["contents of", "first doc"]}
39
assert_equal(1, iw.doc_count)
40
iw << ["contents of", "second doc"]
41
assert_equal(2, iw.doc_count)
42
iw << "contents of third doc"
43
assert_equal(3, iw.doc_count)
47
def test_add_documents_fuzzy
48
iw = IndexWriter.new(:dir => @dir,
49
:analyzer => StandardAnalyzer.new())
51
iw.max_buffered_docs = 3
58
assert_equal(100, iw.doc_count)
62
def test_adding_long_url
63
iw = IndexWriter.new(:dir => @dir,
64
:default_field => 'content')
65
iw << {:content => "http://" + 'x' * 255}
66
# The following line will cause a segfault prior to 0.11.6
67
iw << {:content => "http://" + 'x' * 1_000_000}
73
"desirous", "hollowness's", "camp's", "Senegal", "broadcaster's",
74
"pecking", "Provence", "paternalism", "premonition", "Dumbo's",
75
"Darlene's", "Elbert's", "substrate", "Camille", "Menkalinan", "Cooper",
76
"decamps", "abatement's", "bindings", "scrubby", "subset", "ancestor's",
77
"pelagic", "abscissa", "loofah's", "gleans", "boudoir", "disappointingly",
78
"guardianship's", "settlers", "Mylar", "timetable's", "parabolic",
79
"madams", "bootlegger's", "monotonically", "gage", "Karyn's", "deposed",
80
"boozy", "swordfish's", "Chevron", "Victrola", "Tameka", "impels",
81
"carrels", "salami's", "celibate", "resistance's", "duration",
82
"abscissae", "Kilroy's", "corrosive", "flight's", "flapper", "scare",
83
"peppiest", "Pygmies", "Menzies", "wrist's", "enumerable", "housecoats",
84
"Khwarizmi's", "stampeding", "hungering", "steeping", "Yemenis",
85
"entangles", "solver", "mishapping", "Rand's", "ninety", "Boris",
86
"impedimenta", "predators", "ridge", "wretchedness's", "crapping", "Head",
87
"Edwards", "Claude's", "geodesics", "verities", "botch", "Short's",
88
"vellum's", "coruscates", "hydrogenates", "Haas's", "deceitfulness",
89
"cohort's", "Cepheus", "totes", "Cortez's", "napalm", "fruitcake",
90
"coordinated", "Coulomb", "desperation", "behoves", "contractor's",
91
"vacationed", "Wanamaker's", "leotard", "filtrated", "cringes", "Lugosi",
92
"sheath's", "orb", "jawed", "Isidro", "geophysics", "persons", "Asians",
93
"booze's", "eight's", "backslappers", "hankered", "dos", "helpings",
94
"tough", "interlarding", "gouger", "inflect", "Juneau's", "hay's",
95
"sardining", "spays", "Brandi", "depressant", "space", "assess",
96
"reappearance's", "Eli's", "Cote", "Enoch", "chants", "ruffianing",
97
"moralised", "unsuccessfully", "or", "Maryland's", "mildest", "unsafer",
98
"dutiful", "Pribilof", "teas", "vagued", "microbiologists", "hedgerow",
99
"speller's", "conservators", "catharsis", "drawbacks", "whooshed",
100
"unlawful", "revolve", "craftsmanship", "destabilise", "Margarito",
101
"Asgard's", "spawn's", "Annabel's", "canonicals", "buttermilk",
102
"exaltation's", "pothole", "reprints", "approximately", "homage",
103
"Wassermann's", "Atlantic's", "exacerbated", "Huerta", "keypunching",
104
"engagements", "dilate", "ponchos", "Helvetius", "Krakatoa", "basket's",
105
"stepmother", "schlock's", "drippings", "cardiology's", "northwesterly",
106
"cruddier", "poesies", "rustproof", "climb", "miscalled", "Belgians",
107
"Iago", "brownout", "nurseries", "hooliganism's", "concourse's",
108
"advocate", "sunrise's", "hyper", "octopus's", "erecting",
109
"counterattacking", "redesign", "studies", "nitrating", "milestone",
110
"bawls", "Nereid", "inferring", "Ontario's", "annexed", "treasury",
111
"cosmogony's", "scandalised", "shindig's", "detention's",
112
"Lollobrigida's", "eradicating", "magpie", "supertankers", "Adventist's",
113
"dozes", "Artaxerxes", "accumulate", "dankest", "telephony", "flows",
114
"Srivijaya's", "fourteen's", "antonym", "rancid", "briefing's",
115
"theologian", "Jacuzzi", "gracing", "chameleon's", "Brittney's",
116
"Pullmans", "Robitussin's", "jitterier", "mayonnaise's", "fort",
117
"closeouts", "amatory", "Drew's", "cockfight", "pyre", "Laura's",
118
"Bradley's", "obstructionists", "interventions", "tenderness's",
119
"loadstones", "castigation's", "undercut", "volubly", "meditated",
120
"Ypsilanti", "Jannie's", "tams", "drummer's", "inaugurations", "mawing",
121
"Anglophile", "Sherpa", "footholds", "Gonzalo", "removers",
122
"customisation", "procurement's", "allured", "grimaced", "captaining",
123
"liberates", "grandeur's", "Windsor", "screwdrivers", "Flynn's",
124
"extortionists", "carnivorous", "thinned", "panhandlers", "trust's",
125
"bemoaned", "untwisted", "cantors", "rectifies", "speculation",
126
"niacin's", "soppy", "condom", "halberd", "Leadbelly", "vocation's",
127
"tanners", "chanticleer", "secretariats", "Ecuador's", "suppurated",
128
"users", "slag's", "atrocity's", "pillar", "sleeveless", "bulldozers",
129
"turners", "hemline", "astounded", "rosaries", "Mallarmé", "crucifies",
130
"Maidenform", "contribution", "evolve", "chemicals", "uteri",
131
"expostulation", "roamers", "daiquiris", "arraignment", "ribs", "King's",
132
"Persepolis", "arsenic's", "blindfolds", "bloodsucker's", "restocks",
133
"falconry", "Olympia's", "Colosseum's", "vigils", "Louie's",
134
"unwillingly", "sealed", "potatoes", "Argentine", "audit's", "outworn",
135
"boggles", "likely", "alleging", "Tinkerbell", "redistribution's",
136
"Normandy", "Cortes", "porter's", "buntings", "cornucopias", "rosewoods",
137
"shelf's", "airdrops", "summits", "Rosalyn", "redecorating", "twirlers",
138
"monsters", "directed", "semiautomatics", "Foch", "Hobart", "mutilates",
139
"Wilma's", "ornamenting", "Clifford's", "pyromania", "Strasbourg",
140
"bleeders", "additions", "super", "effortlessly", "piecing", "vacations",
141
"gybes", "warranted", "Ting", "her", "histrionic", "marshaled", "spore's",
142
"villainy's", "brat", "confusion", "amphitheatre's", "adjourns",
143
"guzzled", "Visayans", "rogue's", "morsels", "candlestick", "flaks",
144
"Waterbury", "pulp's", "endorser's", "postdoc", "coffining", "swallowing",
145
"Wrangell", "Marcie's", "Marley", "untapped", "fear's", "Kant",
146
"pursuit's", "normally", "jackals", "orals", "Paramaribo's", "Marilyn's",
147
"Diem's", "narrower", "medicinally", "chickweed's", "pretentiousness",
148
"Lardner", "baritone's", "purrs", "Pam's", "pestles", "Philip's",
149
"Titania", "eccentrics", "Albion's", "greed's", "raggediest",
150
"importations", "Truman", "incentives", "typified", "incurred",
151
"bandstands", "Minnie's", "pleasant", "Sandy's", "perplexities",
152
"crease's", "obliques", "backstop", "Nair's", "perusing", "Quixote's",
153
"sicknesses", "vapour's", "butte", "lariats", "disfavours", "McGuffey",
154
"paediatric", "filtered", "whiff's", "gunboats", "devolved",
155
"extravaganza's", "organism", "giggling", "citadel's", "counterbalances",
156
"executrixes", "Cathay", "marshmallow's", "iniquitous", "Katmai", "Siva",
157
"welled", "impertinence's", "plunger", "rice", "forgers", "Larousse",
158
"pollution's", "medium", "residue's", "rumbas", "Odis", "arrogant",
159
"Jasper's", "panged", "doubted", "vistaing", "decibel's", "modulus's",
160
"chickpea's", "mugger's", "potentates", "sequesters", "academy's",
161
"Turk's", "pharmacology's", "defogger", "clomp", "soulless", "elastic",
162
"la's", "shards", "unfortunate", "counterclaim's", "objections", "towel",
163
"converged", "z", "ionisation", "stirrups", "antiquarians", "constructor",
164
"virtuosity's", "Göteborg", "centigramme's", "translators", "dalliance's",
165
"us", "bullfight", "drawer's", "nonconformist", "handcrafts", "Magritte",
166
"tulle", "plant's", "routine", "colour's", "latency's", "repertoire's",
167
"photocopies", "catalyse", "ashrams", "lagging", "flapjack's",
168
"ayatollahs", "decentest", "pitted", "conformity", "jack", "batsman",
169
"electrifies", "Unitarians", "obtain", "medicates", "tumour's",
170
"nutritionally", "haystack", "bustles", "slut", "satirising", "birettas",
171
"starring", "Kubrick's", "flogs", "chequering", "Menkalinan's",
172
"Barbados's", "Bioko", "swinish", "hades", "perjured", "timing's",
173
"cocaine", "ejecting", "rationalises", "dilettante's", "umping",
174
"capsized", "frogmen", "matt", "prostituting", "bola's", "devolution's",
175
"poxing", "Maritza's", "snob's", "scoped", "Costco", "feral", "sirocco",
176
"rebating", "truculence", "junkier", "nabs", "elicit", "allegiance",
177
"care", "arteriosclerosis's", "nonproliferation's", "doxologies",
178
"disconsolate", "bodega", "designers", "Rembrandt", "apostasies",
179
"garrulousness", "Hertzsprung's", "hayseeds", "noncooperation's",
180
"resentment", "cuticles", "sandboxes", "gimmicks", "magnolia",
181
"invalidity's", "pulverised", "Tinkerbell's", "hypoglycemics",
182
"gunboat's", "workbench's", "fleetingly's", "sportsman's", "trots",
183
"decomposes", "discrepancies", "owls", "obscener", "organic", "stoutness",
184
"councillor's", "Philippine's", "Aline", "coarsening", "suffocated",
185
"infighting's", "peculiarity", "roof's", "premier", "sucked", "churl",
186
"remounts", "intends", "wiles", "unfold", "unperturbed", "wainscotings",
187
"restfuller", "ashtray's", "wader's", "decanters", "gild", "tandems",
188
"spooked", "galling", "annuity's", "opacity", "clamour's", "flaccid",
189
"caroming", "savvying", "mammalian's", "toadstool's", "doohickey", "jibs",
190
"conquests", "dishes", "effusively", "distinctions", "curly", "Peckinpah",
191
"whining", "quasar", "sponge", "infrequent", "Novembers", "cowling",
192
"poem's", "muzzles", "Sufi", "authoritarians", "prompts", "Gavin's",
193
"morphology's", "shenanigan", "narrated", "rapprochement", "Heine",
194
"propane's", "addition", "prefect's", "pining", "dwindles",
195
"compulsiveness's", "objectors", "trudging", "segregates", "language",
196
"enthralled", "explosiveness", "toeing", "drainers", "Merrimack's",
197
"smarten", "bigwig's", "embroiders", "Medicaids", "grammar's", "behest's",
198
"chiseled", "equalled", "factual", "Casablanca's", "dams",
199
"disillusioned", "turtleneck", "Baden", "provinces", "bushwhacked", "fey",
200
"Yangtze", "loan's", "decent", "strobe", "challenger's", "hometown",
201
"Neal", "Ernestine's", "magnetises", "minute", "patrol", "Starbucks",
202
"Bernstein", "signal", "interplanetary", "tweak", "archdeacon",
203
"untoward", "transducer", "azaleas", "levied", "worlds", "talks",
204
"Tancred", "hairsplitting's", "edibility's", "confab", "rosetted",
205
"Spanish", "Americanisation", "Charley", "realm's", "incongruities",
206
"chinstraps", "dollhouses", "binocular", "popgun", "physiotherapy's",
207
"knave's", "angelically", "heartbreaking", "clarions", "bespeaks",
208
"pivotal", "Zosma", "ungrammatical", "dilution", "tidily", "Dejesus's",
209
"taller", "pennyweight's", "freshman", "Jamestown", "chiefer", "amen",
210
"attiring", "appurtenance's", "opiates", "mottoes", "towellings", "ashen",
211
"font's", "spoors", "pupil", "groom's", "skimpy", "achieves",
212
"intolerance's", "ardour's", "exorcist", "bottoming", "snag's",
213
"Frenches", "hysteric's", "ladyfinger's", "differences", "seed",
214
"clubfoot's", "glades", "Elton's", "jargon", "Waldo", "grinning",
215
"coherence's", "winos", "turnround", "appended", "Ethelred's", "delete",
216
"steadfastness's", "miss", "thermoplastic", "depraves", "unctuous",
217
"reanimates", "transfusing", "protects", "Babbage's", "foists", "inn",
218
"etched", "sanctimoniously", "idling", "timepiece", "holistic",
219
"waterside", "ulna's", "swindled", "employables", "zebra", "nieces",
220
"pertained", "usages", "vamp's", "Larry's", "cooler's", "holographs",
221
"clewing", "stubborning", "peaked", "underfeeds", "marshmallows",
222
"agreeable", "beards", "Slovenia's", "nitroglycerin", "palls", "impurer",
223
"armours", "stomachaches", "notification's", "Dixieland's", "crozier's",
224
"neurotic", "kudos", "Tania's", "M", "soundtrack's", "territory's",
225
"sped", "house's", "divisibility", "ingress's", "pummelled", "Isabel",
226
"Dewitt", "seemly", "hutched", "calliope", "lengthwise", "flubs",
227
"Moldavia's", "Mercia", "McBride's", "Lenten", "pulverise", "football",
228
"oligarchy", "Max", "scribbler", "acclimatize", "brainwashes",
229
"apprenticed", "benevolences", "two", "Wodehouse", "crew's", "massacre",
230
"proportionals", "Jewishness's", "instep's", "emissary", "folder",
231
"nonentity's", "convinced", "caption", "kangarooed", "dogie",
232
"vagabonding", "auction's", "appraising", "antimony", "part's",
233
"longitude's", "inconsiderateness's", "pawning", "serer", "solos",
234
"histories", "mushy", "parturition", "munched", "oregano", "inanest",
235
"dryness", "kitchenware", "unexpected", "covens", "cheesecakes",
236
"stakeout's", "Pulaski's", "Yoknapatawpha's", "pinhead", "drifted",
237
"guzzler's", "funking", "sou'wester", "oesophagus's", "highbrow",
238
"contralto", "meningitis", "Mazzini", "raggedest", "vaginas", "misfiring",
239
"margaritas", "wedder", "pointed", "slicked", "garlanded", "comeuppances",
240
"vassals", "Sui", "Concord", "bozos", "Garry's", "Maribel's", "epileptic",
241
"Jehoshaphat's", "revolutionary's", "kneecaps", "songbird", "actively",
242
"Meredith", "toddler", "distrusting", "fuchsias", "perusal", "instills",
243
"deathbed", "sunspot's", "spatula's", "Muscovy", "humaniser", "Keats",
244
"regrets", "deflect", "theories", "nonpluses", "populating", "leniency's",
245
"penicillin's", "gaol's", "borough", "moose's", "dogmata",
246
"transcendentally", "supposition's", "nursed", "Gagarin's", "honest",
247
"Chandrasekhar's", "mudslinger's", "parable", "bonged", "Wyeth's",
248
"Ochoa's", "Grenoble", "steamy", "halter's", "rotisserie's", "pagoda's",
249
"wallaby's", "Yank", "pretzel", "rapist's", "estrange", "hectored",
250
"Puebla's", "conniver", "creditor's", "dole's", "Fotomat", "patents",
251
"heckling", "thickener", "etches", "yogi", "hemstitched", "obverses",
252
"Lipizzaner", "divert", "Strong's", "sagest", "Alabama", "He", "Carrie's",
253
"obligation's", "verity's", "outed", "Rhee", "bluffed", "codas",
254
"crèche's", "unpalatable", "dilettanti", "vestment", "purse's",
255
"inflammation's", "bookmarked", "doing's", "whinnying", "impersonators",
256
"Theiler", "scurried", "resistor", "southerners", "Anacreon",
257
"reconstruction's", "footage", "trespassing", "Kafka", "bottling",
258
"stays", "Gretzky", "overburdening", "princesses", "weathercock's",
259
"atolls", "cheerier", "packet", "surrenders", "teacup", "Sabik's",
260
"undecidable", "lollygagged", "pawl's", "anaesthesiology", "sublimely",
261
"contortionists", "motorcades", "Maureen", "lamasery", "yourselves",
262
"Creighton", "poliomyelitis's", "civil", "outmanoeuvre", "lauded",
263
"closeness", "Humboldt's", "pretzels", "ungrudging", "blackguard's",
264
"sickles", "typo", "narcotics", "linesman", "psychotics", "pictured",
265
"deviltry", "Yahtzee", "Lovelace's", "cerebra", "airiness's", "bewitch",
266
"how", "motherland's", "crate's", "Keenan's", "turnstile's",
267
"pedometer's", "carted", "slipping", "fallow", "Canadian", "ladybird's",
268
"thump", "shopper's", "enters", "scowls", "nematode", "focused",
269
"Riley's", "grainiest", "novas", "snuffled", "leftovers", "deify",
270
"Samoan", "pruning", "contenting", "Khachaturian's", "triads",
271
"genealogies", "psalmist", "shaming", "appropriated", "ignominies",
272
"Beadle's", "MHz", "peerages", "facile", "Seoul", "Janna's", "jig's",
273
"mousiness's", "funnier", "delimiter", "watermark", "sheik's", "Reasoner",
274
"ipecac's", "curdles", "wronged", "Segovia's", "solders", "Dunne's",
275
"contractor", "awards", "hostels", "pinkie's", "Herzl", "misplace",
276
"shuttle", "innovative", "vestries", "cosmoses", "trikes", "Casandra's",
277
"hokier", "carouser's", "summerhouses", "renascence", "decomposed",
278
"Balzac's", "outlast", "shod", "squalling", "smugging", "weighing",
279
"omega's", "selects", "fleetingly", "Finland", "petted", "disrespects",
280
"fetter", "confound", "brads", "Bosnia's", "preposition's", "guy's",
281
"different", "tracts", "paediatrics's", "polygon", "eyetooth's", "Aesop",
282
"pentagons", "professions", "homeowner", "looter's", "intimidated",
283
"lustre's", "loneliness", "catnapped", "counties", "pailful",
284
"Christendom's", "Barents", "penis", "Mumford's", "Nigel", "éclairs",
285
"splats", "diabolical", "popularly", "quart", "abjected", "Rasalgethi",
286
"camel's", "inimical", "overweening", "distention's", "Advil", "casement",
287
"seamier", "avaricious", "sierra's", "caparison's", "moldered", "Cortez",
288
"handmaid's", "disappointment", "billowed", "overpopulated", "outsets",
289
"ray", "smoother", "overkill", "somber", "tiller's", "zigzag", "adviser",
290
"absorption's", "sturdily", "hairy", "bloodmobile", "investiture's",
291
"creature", "ripeness's", "Jonathon", "arborvitae's", "skulduggery",
292
"bog", "skeleton's", "Kit's", "Panamas", "Ashlee's", "jazzy", "snit",
293
"divisive", "caribous", "permuting", "frankest", "annotated", "oak's",
294
"meg's", "Gill", "burrito", "dormancy's", "offings", "Nike",
295
"outnumbered", "skater's", "Portugal", "deficit", "Cannon's", "pockmark",
296
"sediment's", "mailbox", "innuendoed", "retire", "wolfhound's",
297
"nicotine's", "brigade's", "mettle's", "softhearted", "hooey's",
298
"abdication", "Orval", "Jaime", "ship", "hyphenations", "sectarians",
299
"Alabaman", "tagging", "ultras", "schizoids", "medicines", "undersized",
300
"Gray", "maternity's", "bandaging", "scooping", "coercion's", "serapes",
301
"celebrate", "Listerine's", "throve", "crypt's", "nearsighted",
302
"metallurgists", "Delicious", "cotton's", "yoked", "cogitates",
303
"underage", "cigarette's", "hallways", "Cointreau", "ma'am", "spacing's",
304
"foresight", "parkway's", "Edwardian", "mediator", "Turner", "Derrida's",
305
"motorist's", "hobo", "equivalences", "sophism", "peeping", "telescoped",
306
"overproduce", "ductility", "Leblanc", "refractory", "passé", "decodes",
307
"womanising", "flax's", "pond's", "infrequency", "talkativeness's",
308
"settlement's", "Prince", "bating", "multimillionaire", "Schultz",
309
"premiss", "quackery", "bathhouse", "Leno's", "Monday's", "Hung's",
310
"undaunted", "bewaring", "tension's", "Chile's", "Rostand's", "platoons",
311
"rodeo's", "Dionne", "Dyson's", "gingivitis's", "fewer",
312
"electromagnetism's", "scrubbier", "ensconced", "wretcheder", "mica's",
313
"expectorant", "snapper's", "chastised", "habitation", "spry", "bathing",
314
"stealth's", "champagnes", "baleful", "fencing's", "threaded", "codicils",
315
"disgraced", "redcaps", "addends", "Olivier", "clasped", "Gwendolyn",
316
"foment", "angularity's", "strenuously", "gorilla", "misbehaved",
317
"surplus's", "newsier", "positioned", "bloodmobiles", "circumstantials",
318
"person's", "varicose", "Calliope", "plethora", "Olmsted",
319
"reconciliation", "Brendan's", "beset", "totters", "sailors",
320
"parliamentarians", "Whitaker", "hilts", "pummelling", "academician's",
321
"ruse", "discreeter", "appetisingly", "perfections", "anus", "overrode",
322
"pedantry's", "possessed", "germs", "unscrews", "expired",
323
"semitrailer's", "Cupid's", "nonsmoker", "Marathon", "secs", "Hopkins",
324
"freeing", "libelled", "furious", "staccatos", "electroencephalogram's",
325
"malingerer's", "impulses", "briars", "Tran", "hilltops", "sulks",
326
"quailed", "fads", "retrenches", "spouted", "outtake", "puncture's",
327
"rats", "kibitzed", "berets", "omnivorous", "flange", "Mons", "glints",
328
"mansards", "thou", "cuing", "suspected", "Kaiser's", "savvier", "skits",
329
"interdict's", "Booker", "Rubinstein", "Tm's", "crossing's", "dewlap",
330
"guarantor's", "edification's", "joyfullest", "crossed", "chowdering",
331
"sillier", "reloading", "commodity's", "bodkins", "conduced", "coughs",
332
"nucleus's", "sixtieth", "proverbially", "comprehensive", "ineluctably",
333
"patrolmen", "resuscitating", "carpetbag's", "Darrin's", "Yeager",
334
"Bataan's", "spoonsful", "proceeds", "wrongdoer", "Karroo", "heart",
335
"poison", "typifying", "endowment's", "aquanauts", "deaconesses",
336
"homosexuality", "Maxine", "haunching", "centred", "Peking's",
337
"toothiest", "growers", "firebombs", "throbs", "Downy", "contribution's",
338
"sago's", "Cole", "Knoxville", "leftmost", "Nell's", "Baffin", "barrings",
339
"contagions", "disencumbers", "countdown", "quintuple", "perihelion",
340
"creationism's", "actioning", "admiralty", "Mt's", "durability's",
341
"sewer's", "replicas", "oxide", "ripened", "Pisces's", "Cinerama's",
342
"catheters", "oppressive", "roosting", "foggiest", "properly", "Kareem",
343
"Ollie", "minuted", "vehicles", "eel", "remunerates", "swashbuckler's",
344
"remunerative", "sanguining", "Belem's", "forlornly", "rudders",
345
"officialdom", "countertenors", "Upton", "whoop", "animations", "arouses",
346
"millionths", "videocassette", "fledgling", "shake", "exterminated",
347
"Cain's", "trendiest", "wariest", "torpedoes", "airmails", "Cameron's",
348
"discord's", "spitefulness's", "thudded", "menaced", "takeovers",
349
"solicited", "wallpapers", "economic", "cache", "rechargeable", "gongs",
350
"droning", "exemption", "Alaskans", "toothed", "snifter", "Stephens",
351
"prejudge", "doctor's", "bobolinks", "rotates", "valuation's", "narrator",
352
"weaning", "uncle", "shelter", "destitution's", "Edgardo's", "gauge",
353
"Nice", "Adolf's", "rheumatics", "inheritances", "undesirables",
354
"Eileen's", "flyweight's", "scope", "possessiveness", "tipsily",
355
"effulgence", "rematch", "Baltic", "unsteadiest", "rodeos", "gloaming's",
356
"ringers", "randomised", "commissars", "destroyer's", "router",
357
"disengaging", "it's", "Albert", "rampantly", "varmint", "Adkins",
358
"chevron", "insomniac", "bobsledded", "masochist's", "chronometers",
359
"compaction", "Mauro", "sidled", "Highlander's", "snail's", "syllabifies",
360
"application's", "symmetrical", "blacking", "accent's", "sentimentalists",
361
"sonatas", "profanities", "sloping", "Araby", "percolate", "repeated",
362
"youthfulness's", "Loyola", "deliriously", "matriarch's", "tailors",
363
"rerouting", "hairpin", "dispersal", "endowment", "disquieting", "swat",
364
"neckerchieves", "wrinkles", "amoebas", "Darcy", "orthodontics's",
365
"milder", "sneezing", "prescience's", "pads", "wrought", "perspicuity's",
366
"materialist", "pull", "laundryman's", "lazily", "protractor's", "Vic",
367
"photocopier", "guardrooms", "cablecasting", "confirms", "excretions",
368
"combatant", "counterfeiters", "periwig", "genteelest", "router's",
369
"springy", "procreated", "syphon", "parent's", "bigwigs", "rebelled",
370
"milkmaids", "McGee's", "seaworthier", "Bellatrix's", "tenement",
371
"embryologists", "Vaselining", "burrow's", "tonnage's", "Petty's",
372
"chancels", "scouring", "mouser", "recompensed", "guarding", "editor",
373
"raster", "bourgeoisie's", "interpolating", "skinflint's", "transport",
374
"bullfinch", "needlessly", "withholds", "counterclockwise", "panicking",
375
"Ahriman", "flambeing", "contrary", "heartstrings", "whittled", "crib's",
376
"highlighter", "extroverted", "Martinique's", "racquets", "Maldivian",
377
"physiognomy", "Hammarskjold", "massage", "shingling", "neighbourhood",
378
"boobed", "vulture", "intercontinental", "cobblers", "peddlers",
379
"forthrightly", "germicide", "raindrop's", "fir's", "decaffeinates",
380
"wobblier", "abnegated", "cruiser's", "satiety", "trilled", "impending",
381
"gulf", "mountebank", "beltway", "reappointment", "cinematographer",
382
"pylon", "penthouses", "morally", "installs", "Walsh's", "drawstring",
383
"circus's", "Khayyam's", "Myrtle's", "ventrals", "category's",
384
"opportunistic", "grovelling", "warier", "upchuck", "hairdresser's",
385
"Montanans", "jobber", "dazzle", "encirclement's", "muffin's", "coronets",
386
"focus's", "footfall's", "subjunctives", "late", "pedagogued",
387
"dignitaries", "content", "blockbusters", "reminiscent", "mayor",
388
"specifier", "extinction", "nutshell's", "catbird's", "bundle",
389
"gracefulness", "exceed", "estranges", "chancy", "bankrupted", "Avery",
390
"Barnett", "succulence", "stacking", "ensnare", "truck", "embargo",
391
"persecutes", "translation's", "muskrat's", "illumines", "undercoat's",
392
"fleecier", "brick", "qualities", "imprecision", "reprisals", "discounts",
393
"harmonics", "Mann's", "terrorism", "interminable", "Santiago's",
394
"deepness", "tramples", "golder", "voyeurism's", "tent", "particle's",
395
"minuend", "waxwings", "knobby", "trustee", "funnily", "hotheadedness's",
396
"Kristin", "what", "bite", "murmur's", "pustule's", "weeknights",
397
"rocked", "athlete", "ventilates", "impresses", "daguerreotyping",
398
"Gross", "gambols", "villa", "maraud", "disapproval", "apostrophe's",
399
"sheaf", "noisemaker's", "autonomy's", "massing", "daemon's", "Thackeray",
400
"fermenting", "whammy", "philosophise", "empathy", "calamities",
401
"sunbathe", "Qom", "yahoo's", "coxcomb's", "move", "school's",
402
"rainmakers", "shipwreck", "potbelly's", "courageously", "current",
403
"Aleut", "treaties", "U", "always", "Bosch", "impregnating", "bud's",
404
"carat", "centrists", "acquaintance's", "convoy's", "chichis",
405
"restraint's", "Cosby", "factotums", "handshaking", "paragon's",
406
"mileages", "Tammie", "cartoonists", "lemmas", "lowliness's", "onion's",
407
"E's", "Bible", "Cranmer", "fob's", "minks", "overstocking", "Willamette",
408
"needle's", "scuppers", "Carborundum", "upwardly", "tallies", "aptitude",
409
"synod", "nasturtium's", "Pensacola", "snappish", "merino", "sups",
410
"fingerboard's", "prodigy's", "narcissism's", "substantial", "lug",
411
"establishing", "Vergil's", "patrimonies", "shorted", "forestation",
412
"undeniable", "Katmandu", "lamination", "trollop's", "odd", "stanza",
413
"paraplegic", "melanin", "Rico", "foreman", "stereotypes", "affinity's",
414
"cleansing", "sautéing", "epochs", "crooners", "manicured", "undisclosed",
415
"propel", "usage", "Alioth's", "Aurelia's", "peruse", "Vassar's",
416
"Demosthenes's", "Brazos", "supermarket", "scribbles", "Jekyll's",
417
"discomfort's", "mastiffs", "ballasting", "Figueroa", "turnstiles",
418
"convince", "Shelton's", "Gustavo", "shunting", "Fujitsu's", "fining's",
419
"hippos", "dam's", "expressionists", "peewee", "troop's"
421
WORDS_SIZE = WORDS.size
424
return WORDS[rand(WORDS_SIZE)]
427
def random_sentence(max_len)
429
(1 + rand(max_len)).times { sentence << " " << random_word }
433
def random_doc(max_fields = 10, max_elements = 10, max_len = 100)
435
(1 + rand(max_fields)).times do
436
field = random_word.intern
437
elem_count = rand(max_elements) + 1
439
doc[field] = random_sentence(max_len)
442
elem_count.times { doc[field] << random_sentence(max_len)}