Class: Xapian::Xapian::Database

### Home Classes Methods

### In Files

- xapian.rb

### Parent

Object

### Methods

- #allterms
- #positionlist
- #postlist
- #termlist
- #valuestream

### Class/Module Index

Quicksearch

- Xapian
- Xapian::AssertionError
- Xapian::BM25Weight
- Xapian::BoolWeight
- Xapian::Compactor
- Xapian::DatabaseCorruptError
- Xapian::DatabaseCreateError
- Xapian::DatabaseError
- Xapian::DatabaseLockError
- Xapian::DatabaseModifiedError
- Xapian::DatabaseOpeningError
- Xapian::DatabaseVersionError
- Xapian::DateValueRangeProcessor
- Xapian::DecreasingValueWeightPostingSource
- Xapian::DocNotFoundError
- Xapian::ESetIterator
- Xapian::Error
- Xapian::ErrorHandler
- Xapian::ExpandDecider
- Xapian::ExpandDeciderAnd
- Xapian::ExpandDeciderFilterTerms
- Xapian::FeatureUnavailableError
- Xapian::FixedWeightPostingSource
- Xapian::InternalError
- Xapian::InvalidArgumentError
- Xapian::InvalidOperationError
- Xapian::KeyMaker
- Xapian::LogicError
- Xapian::MSetIterator
- Xapian::MatchDecider
- Xapian::MatchSpy
- Xapian::MultiValueKeyMaker
- Xapian::MultiValueSorter
- Xapian::NetworkError
- Xapian::NetworkTimeoutError
- Xapian::NumberValueRangeProcessor
- Xapian::PositionIterator
- Xapian::PostingIterator
- Xapian::PostingSource
- Xapian::QueryParser
- Xapian::QueryParserError
- Xapian::RSet
- Xapian::RangeError
- Xapian::Registry
- Xapian::RuntimeError
- Xapian::SerialisationError
- Xapian::SimpleStopper
- Xapian::Sorter
- Xapian::Stem
- Xapian::StemImplementation
- Xapian::Stopper
- Xapian::StringValueRangeProcessor
- Xapian::TermGenerator
- Xapian::TermIterator
- Xapian::TradWeight
- Xapian::UnimplementedError
- Xapian::Utf8Iterator
- Xapian::ValueIterator
- Xapian::ValueMapPostingSource
- Xapian::ValuePostingSource
- Xapian::ValueRangeProcessor
- Xapian::ValueSetMatchDecider
- Xapian::ValueWeightPostingSource
- Xapian::Weight
- Xapian::WritableDatabase
- Xapian::Xapian
- Xapian::Xapian::Database
- Xapian::Xapian::Document
- Xapian::Xapian::ESet
- Xapian::Xapian::Enquire
- Xapian::Xapian::ExpandTerm
- Xapian::Xapian::MSet
- Xapian::Xapian::Match
- Xapian::Xapian::Posting
- Xapian::Xapian::Query
- Xapian::Xapian::Value
- Xapian::Xapian::ValueCountMatchSpy
- Xapian::Xapian::Xapian
- Xapian::Xapian::Xapian::Term

No matching classes.

# Xapian::Xapian::Database

Refer to the Xapian::Database C++ API documentation for methods not specific to Ruby.

### Public Instance Methods

allterms(pref = '') click to toggle source

Returns an Array of all Xapian::Terms for this database.

    # File xapian.rb, line 249
    def allterms(pref = '')
      Xapian._safelyIterate(self._dangerous_allterms_begin(pref),
                            self._dangerous_allterms_end(pref)) { |item|
        Xapian::Term.new(item.term, 0, item.termfreq)
      }
    end

positionlist(docid, term) click to toggle source

Returns an Array of Xapian::Termpos objects for the given term (a String) in the given docid.

    # File xapian.rb, line 275
    def positionlist(docid, term)
      Xapian._safelyIterate(self._dangerous_positionlist_begin(docid, term),
                            self._dangerous_positionlist_end(docid, term)) { |item|
        item.termpos
      }
    end

postlist(term) click to toggle source

Returns an Array of Xapian::Postings for the given term. term is a string.

    # File xapian.rb, line 258
    def postlist(term)
      Xapian._safelyIterate(self._dangerous_postlist_begin(term),
                            self._dangerous_postlist_end(term)) { |item|
        Xapian::Posting.new(item.docid, item.doclength, item.wdf)
      }
    end

termlist(docid) click to toggle source

Returns an Array of Terms for the given docid.

    # File xapian.rb, line 266
    def termlist(docid)
      Xapian._safelyIterate(self._dangerous_termlist_begin(docid),
                            self._dangerous_termlist_end(docid)) { |item|
        Xapian::Term.new(item.term, item.wdf, item.termfreq)
      }
    end

valuestream(slot) click to toggle source

Returns an Array of Xapian::Value objects for the given slot in the database.

    # File xapian.rb, line 284
    def valuestream(slot)
      Xapian._safelyIterate(self._dangerous_valuestream_begin(slot),
                            self._dangerous_valuestream_end(slot)) { |item|
        Xapian::Value.new(item.value, slot, item.docid)
      }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.