With the introduction of Ferret, Ruby users now have one of the fastest and most flexible search libraries available. And it's surprisingly easy to use.
This book will show you how to quickly get up and running with Ferret. You'll learn how to index different document types such as PDF, Microsoft Word, and HTML, as well as how to deal with foreign languages and different character encodings. This document describes the Ferret Query Language in detail along with the object-oriented approach to building queries.
You will also be introduced to sorting, filtering, and highlighting your search results, with an explanation of exactly how you need to set up your index to perform these tasks. You will also learn how to optimize a Ferret index for lightning fast indexing and split-second query results.
-
Chapter 1 Getting Started
-
Installing Ferret
-
A Quick Example: Indexing the Filesystem
-
Summary
-
-
Chapter 2 Indexing
-
Index Storage
-
Documents, Fields, and Boosts
-
Setting Up the Index
-
Basic Indexing Operations
-
Indexing Non-String Datatypes
-
Summary
-
-
Chapter 3 Advanced Indexing
-
How the Indexing Process Works
-
Tuning Indexing Performance
-
Optimizing the Index
-
Index Locking and Concurrency Issues
-
Summary
-
-
Chapter 4 Search
-
Overview of Searching Classes
-
Building Queries
-
QueryParser
-
Filtering Search Results
-
Sorting Search Results
-
Highlighting Query Results
-
Summary
-
-
Chapter 5 Analysis
-
Token
-
TokenStream
-
Analyzer
-
Custom Analysis
-
-
Chapter 6 Ferret in Practice
-
Indexing Multiple Document Types
-
Other Indexing Improvements
-
Search Improvements
-
Putting It All Together
-
Summary
-
-
Colophon
- Title:
- Ferret
- By:
- David Balmain, David Balmain
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- March 2008
- Ebook Release:
- December 2008
- Pages:
- 112
- Print ISBN:
- 978-0-596-51940-7
- | ISBN 10:
- 0-596-51940-0
- Ebook ISBN:
- 978-0-596-15848-4
- | ISBN 10:
- 0-596-15848-3
The animal on the cover of Ferret is a ferret. The scientific name for the domestic ferret is Mustela putorius furo, or "weasel-like smelly thief." These slender, carnivorous mammals are about 20 inches long-including a 5-inch tail-weigh 2-4 pounds, and live for 7-10 years. Common colors include albino, chocolate, butterscotch, silver, and cinnamon. The domestic ferret is sometimes confused with the wild black-footed ferret (Mustela nigripes), an endangered North American mammal related to the Russian polecat. Male ferrets are called hobs, female ferrets are jills, and young ferrets are kits. A group of ferrets is a business.
Ferrets were first bred 2,500 years ago in Africa for hunting rabbits. Today they are more often kept as pets, and are now the third most popular pet in the United States after cats and dogs. Ferrets are intelligent and playful; they can recognize their names and learn simple tricks. They have a habit of stealing household objects and hiding them-socks, keys, books, umbrellas, T.V. remotes, even fish out of bowls. When ferrets are excited and want to play, they bounce and flop around in a routine known as a "weasel war dance." They may also hiss and arch their backs. Ferrets in war dances tend to be clumsy, often hopping into things or tripping on their own feet.
Some parts of the world restrict the keeping of ferrets. A ferret-free zone, or FFZ, is a place where ferrets are banned or illegal. Three reasons are often cited for a ban: ferrets may bite or scratch children; there is no proven rabies vaccine for ferrets; and ferrets may threaten native wildlife. However, these points are often disputed. Former mayor of New York City Rudy Giuliani infamously clashed with ferret lovers in 2001, when the city council considered dropping the ban on ferrets and Giuliani opposed it, railing against ferrets as "wild animals." Still, many regions are being persuaded to change their anti-ferret laws, and the only U.S. states that now ban ferrets are California and Hawaii.
The cover image is from the Dover Pictorial Archive. The cover font is Adobe's ITC Garamond. The text font is Linotype Birka, the heading font is Adobe Myriad Condensed, and the code font is LucasFont's TheSans Mono Condensed.




