Introduction to Search with Sphinx

Book description

This concise introduction to Sphinx shows you how to use this free software to index an enormous number of documents and provide fast results to both simple and complex searches. Written by the creator of Sphinx, this authoritative book is short and to the point.

  • Understand the particular way Sphinx conducts searches
  • Install and configure Sphinx, and run a few basic tests
  • Issue basic queries to Sphinx at the application level
  • Learn the syntax of search text and the effects of various search options
  • Get strategies for dealing with large data sets, such as multi-index searching
  • Apply relevance and ranking guidelines for presenting best results to the user

Table of contents

  1. Introduction to Search with Sphinx
  2. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  3. Preface
    1. Audience
    2. Organization of This Book
    3. Conventions Used in This Book
    4. Using Code Examples
    5. We’d Like to Hear from You
    6. Safari® Books Online
    7. Acknowledgments
  4. 1. The World of Text Search
    1. Terms and Concepts in Search
      1. Thinking in Documents Versus Databases
      2. Why Do We Need Full-Text Indexes?
      3. Query Languages
      4. Logical Versus Full-Text Conditions
        1. Logical conditions
        2. Full-text queries
        3. Differences between logical and full-text searches
      5. Natural Language Processing
      6. From Text to Words
      7. Linguistics Crash Course
      8. Relevance, As Seen from Outer Space
      9. Result Set Postprocessing
      10. Full-Text Indexes
    2. Search Workflows
      1. Kinds of Data
      2. Indexing Approaches
      3. Full-Text Indexes and Attributes
      4. Approaches to Searching
      5. Kinds of Results
  5. Getting Started with Sphinx
    1. Workflow Overview
    2. Getting Started ... in a Minute
    3. Basic Configuration
      1. Defining Data Sources
        1. Disk-based indexes
        2. RT indexes
        3. Distributed indexes
      2. Declaring Fields and Attributes in SQL Data
      3. Sphinx-Wide Settings
      4. Managing Configurations with Inheritance and Scripting
    4. Accessing searchd
      1. Configuring Interfaces
      2. Using SphinxAPI
      3. Using SphinxQL
    5. Building Sphinx from Source
      1. Quick Build
      2. Source Build Requirements
      3. Configuring Sources and Building Binaries
  6. 3. Basic Indexing
    1. Indexing SQL Data
      1. Main Fetch Query
      2. Pre-Queries, Post-Queries, and Post-Index Queries
      3. How the Various SQL Queries Work Together
      4. Ranged Queries for Larger Data Sets
    2. Indexing XML Data
      1. Index Schemas for XML Data
      2. XML Encodings
      3. xmlpipe2 Elements Reference
    3. Working with Character Sets
    4. Handling Stop Words and Short Words
  7. 4. Basic Searching
    1. Matching Modes
    2. Full-Text Query Syntax
      1. Known Operators
      2. Escaping Special Characters
      3. AND and OR Operators and a Notorious Precedence Trap
      4. NOT Operator
      5. Field Limit Operator
      6. Phrase Operator
      7. Keyword Proximity Operator
      8. Quorum Operator
      9. Strict Order (BEFORE) Operator
      10. NEAR Operator
      11. SENTENCE and PARAGRAPH Operators
      12. ZONE Limit Operator
      13. Keyword Modifiers
    3. Result Set Contents and Limits
    4. Searching Multiple Indexes
    5. Result Set Processing
      1. Expressions
      2. Filtering
      3. Sorting
      4. Grouping
  8. 5. Managing Indexes
    1. The “Divide and Conquer” Concept
    2. Index Rotation
    3. Picking Documents
    4. Handling Updates and Deletions with K-Lists
    5. Scheduling Rebuilds, and Using Multiple Deltas
    6. Merge Versus Rebuild Versus Deltas
    7. Scripting and Reloading Configurations
  9. 6. Relevance and Ranking
    1. Relevance Assessment: A Black Art
    2. Relevance Ranking Functions
    3. Sphinx Rankers Explained
      1. BM25 Factor
      2. Phrase Proximity Factor
      3. Overview of the Available Rankers
      4. Nitty-gritty Ranker Details
      5. How Do I Draw Those Stars?
      6. How Do I Rank Exact Field Matches Higher?
      7. How Do I Force Document D to Rank First?
      8. How Does Sphinx Ranking Compare to System XYZ?
    4. Where to Go from Here
  10. About the Author
  11. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  12. Copyright

Product information

  • Title: Introduction to Search with Sphinx
  • Author(s): Andrew Aksyonoff
  • Release date: April 2011
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449308667