Class: Ferret::Search::Query

Inherits:
Object
  • Object
show all
Defined in:
ext/r_search.c

Overview

Summary

Abstract class representing a query to the index. There are a number of concrete Query implementations;

  • TermQuery

  • MultiTermQuery

  • BooleanQuery

  • PhraseQuery

  • ConstantScoreQuery

  • FilteredQuery

  • MatchAllQuery

  • RangeQuery

  • WildcardQuery

  • FuzzyQuery

  • PrefixQuery

  • Spans::SpanTermQuery

  • Spans::SpanFirstQuery

  • Spans::SpanOrQuery

  • Spans::SpanNotQuery

  • Spans::SpanNearQuery

Explore these classes for the query right for you. The queries are passed to the Searcher#search* methods.

Query Boosts

Queries have a boost value so that you can make the results of one query more important than the results of another query when combining them in a BooleanQuery. For example, documents on Rails. To avoid getting results for train rails you might also add the tern Ruby but Rails is the more important term so you’d give it a boost.