Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Pike Module Reference:

module version 1.9, prepared


Constant OP_AND

constant OP_AND

Description

Return iff both subqueries are satisfied.


Constant OP_OR

constant OP_OR

Description

Return if either subquery is satisfied.


Constant OP_AND_NOT

constant OP_AND_NOT

Description

Return if left but not right satisfied.


Constant OP_XOR

constant OP_XOR

Description

Return if one query satisfied, but not both.


Constant OP_AND_MAYBE

constant OP_AND_MAYBE

Description

Return iff left satisfied, but use weights from both.


Constant OP_FILTER

constant OP_FILTER

Description

As AND, but use only weights from left subquery.


Constant OP_NEAR

constant OP_NEAR

Description

Find occurrences of a list of terms with all the terms occurring within a specified window of positions.

Each occurrence of a term must be at a different position, but the order they appear in is irrelevant.

The window parameter should be specified for this operation, but will default to the number of terms in the list.


Constant OP_PHRASE

constant OP_PHRASE

Description

Find occurrences of a list of terms with all the terms occurring within a specified window of positions, and all the terms appearing in the order specified.

Each occurrence of a term must be at a different position.

The window parameter should be specified for this operation, but will default to the number of terms in the list.


Constant OP_ELITE_SET

constant OP_ELITE_SET

Description

Select an elite set from the subqueries, and perform a query with these combined as an OR query.


Constant OP_VALUE_RANGE

constant OP_VALUE_RANGE

Description

Filter by a range test on a document value.


Constant OP_SCALE_WEIGHT

constant OP_SCALE_WEIGHT

Description

Scale the weight of a subquery by the specified factor.

A factor of 0 means this subquery will contribute no weight to the query - it will act as a purely boolean subquery.

If the factor is negative, an error will be thrown.


Constants

constant DB_CREATE_OR_OPEN
constant DB_CREATE
constant DB_CREATE_OR_OVERWRITE
constant DB_OPEN
constant BAD_VALUENO


Constant OP_AND

constant OP_AND

Description

Return iff both subqueries are satisfied.

  MODULE Public
Modules
Xapian

  MODULE Public.Xapian
Classes
BM25Weight
BoolWeight
Database
DateValueRangeProcessor
Document
ESet
ESetIterator
Enquire
MSet
MSetIterator
NumberValueRangeProcessor
PositionIterator
Query
QueryParser
RSet
SimpleStopper
Stem
Stopper
StringValueRangeProcessor
TermGenerator
TermIterator
TradWeight
ValueIterator
ValueRangeProcessor
Weight
WriteableDatabase

Methods
major_version()
minor_version()
revision()
sortable_serialise()
sortable_unserialise()
version_string()
Description

An interface to the Xapian full text engine.

For details, please see http://www.xapian.org


Method sortable_serialise

string Public.Xapian.sortable_serialise(float value)

Description

Convert a floating point number to a string, preserving sort order.


Method sortable_unserialise

float Public.Xapian.sortable_unserialise(string value)

Description

Convert a string encoded using sortable_serialise back to a floating point number.


Method minor_version

int Public.Xapian.minor_version()


Method major_version

int Public.Xapian.major_version()


Method revision

int Public.Xapian.revision()


Method version_string

string Public.Xapian.version_string()

Description

Report the version string of the library which the program is linked with.

  CLASS Public.Xapian.Weight
Methods
destroy()
get_maxextra()
get_maxpart()
get_sumextra()
get_sumpart()
get_sumpart_needs_doclength()
name()
serialise()

Method get_sumpart_needs_doclength

int Public.Xapian.Weight()->get_sumpart_needs_doclength()

Description

returns false if the weight object doesn't need doclength

Returns

Method get_maxpart

float Public.Xapian.Weight()->get_maxpart()

Description

Gets the maximum value that get_sumpart() may return.

This is used in optimising searches, by having the postlist tree decay appropriately when parts of it can have limited, or no, further effect.

Returns

Method get_maxextra

float Public.Xapian.Weight()->get_maxextra()

Description

Gets the maximum value that get_sumextra() may return.

This is used in optimising searches.

Returns

Method get_sumextra

float Public.Xapian.Weight()->get_sumextra(int len, int uniqterms)

Description

Get an extra weight for a document to add to the sum calculated over the query terms.

This returns a weight for a given document, and is used by some weighting schemes to account for influence such as document length.

Parameter len

the (unnormalised) document length.

Parameter uniqterms

the number of unique terms in the document.

Returns

Method get_sumpart

float Public.Xapian.Weight()->get_sumpart(int wdf, int len)

Description

Get a weight which is part of the sum over terms being performed.

This returns a weight for a given term and document. These weights are summed to give a total weight for the document.

Parameter wdf

the within document frequency of the term.

Parameter len

the (unnormalised) document length.

Parameter uniqterms

number of unique terms in the document (used for absolute smoothing)

Returns

Method serialise

string Public.Xapian.Weight()->serialise()

Description

Serialise object parameters into a string.

Returns

Method name

string Public.Xapian.Weight()->name()

Description

Name of the weighting scheme.

If the subclass is called FooWeight, this should return "Foo".

Returns

Method destroy

void Public.Xapian.Weight()->destroy()

  CLASS Public.Xapian.BM25Weight
Description

BM25 weighting scheme.


Inherit Weight

  • Weight
  •   CLASS Public.Xapian.BoolWeight
    Description

    Boolean weighting scheme (everything gets 0).


    Inherit Weight

  • Weight
  •   CLASS Public.Xapian.TradWeight
    Description

    Traditional probabilistic weighting scheme.

    This class implements the Traditional Probabilistic Weighting scheme, as described by the early papers on Probabilistic Retrieval. BM25Weight generally gives better results.


    Inherit Weight

  • Weight
  •   CLASS Public.Xapian.ValueRangeProcessor
    Methods
    `()()
    destroy()
    Description

    Base class for value range processors.


    Method `()

    int Public.Xapian.ValueRangeProcessor()->`()(string begin, string end)

    Description

    Is term a stop-word?

    Returns

    1 if true, 0 otherwise.


    Method destroy

    void Public.Xapian.ValueRangeProcessor()->destroy()

      CLASS Public.Xapian.StringValueRangeProcessor
    Description

    Handle a string range.

    The end points can be any strings.


    Inherit ValueRangeProcessor

  • ValueRangeProcessor
  •   CLASS Public.Xapian.NumberValueRangeProcessor
    Methods
    create()
    Description

    Handle a number range.

    This class must be used on values which have been encoded using Public.Xapian.sortable_serialise() which turns numbers into strings which will sort in the same order as the numbers (the same values can be used to implement a numeric sort).


    Inherit ValueRangeProcessor

  • ValueRangeProcessor

  • Method create

    void Public.Xapian.NumberValueRangeProcessor()->create(int valueno, string _str, int is_prefix)

    Description

    The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_).

    If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range.

    The remainder of both strings defining the endpoints must be valid floating point numbers. (FIXME: define format recognised).

    For example, if str_ is "$" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "$10..50" or "$10..50", but not "10..50" or "10..$50" as valid ranges. If str_ is "kg" and prefix_ is false, the queryparser will accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" as valid ranges.

      CLASS Public.Xapian.DateValueRangeProcessor
    Methods
    create()

    Inherit ValueRangeProcessor

  • ValueRangeProcessor

  • Method create

    void Public.Xapian.DateValueRangeProcessor()->create(int valueno, int prefer_mdy, int epoch_year)

    Parameter valueno

    The value number to return from `()().

    Parameter prefer_mdy

    Should ambiguous dates be interpreted as month/day/year rather than day/month/year?

    Parameter epoch_year

    Year to use as the epoch for dates with 2 digit years (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970).

      CLASS Public.Xapian.Stopper
    Methods
    `()()
    destroy()
    get_description()
    Description

    Base class for stop-word decision functor.


    Method `()

    int Public.Xapian.Stopper()->`()(string word)

    Description

    Is term a stop-word?

    Returns

    1 if true, 0 otherwise.


    Method get_description

    string Public.Xapian.Stopper()->get_description()

    Returns

    Method destroy

    void Public.Xapian.Stopper()->destroy()

      CLASS Public.Xapian.SimpleStopper
    Methods
    add()
    Description

    Simple implementation of Stopper class - this will suit most users.


    Inherit Stopper

  • Stopper

  • Method add

    void Public.Xapian.SimpleStopper()->add(string word)

    Description

    Add a single stop word.

      CLASS Public.Xapian.Stem
    Methods
    `()()
    create()
    create()
    destroy()
    get_description()
    Description

    Class representing a stemming algorithm.


    Method create

    void Public.Xapian.Stem()->create(string language)

    Description

    Construct a Stem object for a particular language.

    Parameter language

    Either the English name for the language or the two letter ISO639 code.

    The following language names are understood (aliases follow the name):

    * none - don't stem terms * danish (da) * dutch (nl) * english (en) - Martin Porter's 2002 revision of his stemmer * english_lovins (lovins) - Lovin's stemmer * english_porter (porter) - Porter's stemmer as described in his 1980 paper * finnish (fi) * french (fr) * german (de) * italian (it) * norwegian (no) * portuguese (pt) * russian (ru) * spanish (es) * swedish (sv)

    an error will be thrown if the specified language is unknown.


    Method create

    void Public.Xapian.Stem()->create()


    Method `()

    string Public.Xapian.Stem()->`()(string word)

    Description

    stem a word

    Parameter word

    word to be stemmed

    Returns

    the word stem

    Note

    this function is wide-string aware.


    Method get_description

    string Public.Xapian.Stem()->get_description()

    Returns

    Method destroy

    void Public.Xapian.Stem()->destroy()

      CLASS Public.Xapian.Query
    Methods
    create()
    create()
    create()
    create()
    create()
    empty()
    get_description()
    get_length()
    Description

    Class representing a query.

    Queries are represented as a tree of objects.


    Method create

    void Public.Xapian.Query()->create()

    Description

    Default constructor: makes an empty query which matches no documents.

    Also useful for defining a Query object to be assigned to later.

    Note

    An exception will be thrown if an attempt is made to use an undefined query when building up a composite query.


    Method create

    void Public.Xapian.Query()->create(string term, int wqf, int pos)

    Description

    A query consisting of a single term.


    Method create

    void Public.Xapian.Query()->create(int op, string left, string right)

    Description

    A query consisting of two terms, opp-ed together.


    Method create

    void Public.Xapian.Query()->create(int op, object left, object right)

    Description

    A query consisting of two subqueries, opp-ed together.


    Method create

    void Public.Xapian.Query()->create(int op, object(Query) query)

    Description

    Apply the specified operator to a single Query object, with a double parameter.


    Method get_length

    int Public.Xapian.Query()->get_length()

    Description

    Get the length of the query, used by some ranking formulae.

    This value is calculated automatically - if you want to override it you can pass a different value to Enquire.set_query().

    Returns

    Method empty

    int Public.Xapian.Query()->empty()

    Description

    Test if the query is empty (i.e. was constructed using the default constructor).

    Returns

    Method get_description

    string Public.Xapian.Query()->get_description()

    Returns
      CLASS Public.Xapian.PositionIterator
    Methods
    get_description()
    get_position()
    skip_to()

    Method skip_to

    void Public.Xapian.PositionIterator()->skip_to(int pos)

    Returns

    Method get_position

    int Public.Xapian.PositionIterator()->get_position()

    Returns

    Method get_description

    string Public.Xapian.PositionIterator()->get_description()

    Returns
      CLASS Public.Xapian.ValueIterator
    Methods
    get_description()
    get_value()
    get_valueno()

    Method get_valueno

    int Public.Xapian.ValueIterator()->get_valueno()

    Returns

    Method get_value

    int Public.Xapian.ValueIterator()->get_value()

    Returns

    Method get_description

    string Public.Xapian.ValueIterator()->get_description()

    Returns
      CLASS Public.Xapian.TermIterator
    Methods
    get_description()
    get_term()
    get_termfreq()
    get_wdf()
    position_iterator()
    positionlist_count()

    Method position_iterator

    object Public.Xapian.TermIterator()->position_iterator()

    Returns

    an object which can be passed to foreach()


    Method get_wdf

    int Public.Xapian.TermIterator()->get_wdf()

    Returns

    Method get_termfreq

    int Public.Xapian.TermIterator()->get_termfreq()

    Returns

    Method positionlist_count

    int Public.Xapian.TermIterator()->positionlist_count()

    Returns

    Method get_term

    string Public.Xapian.TermIterator()->get_term()

    Returns

    Method get_description

    string Public.Xapian.TermIterator()->get_description()

    Returns
      CLASS Public.Xapian.Document
    Methods
    add_posting()
    add_term()
    add_value()
    clear_terms()
    clear_values()
    create()
    get_data()
    get_description()
    get_value()
    remove_posting()
    remove_term()
    remove_value()
    set_data()
    term_iterator()
    termlist_count()
    value_iterator()
    values_count()
    Description

    A document in the database - holds data, values, terms, and postings.


    Method create

    void Public.Xapian.Document()->create()


    Method set_data

    void Public.Xapian.Document()->set_data(string data)

    Description

    Set data stored in the document.


    Method value_iterator

    object(ValueIterator) Public.Xapian.Document()->value_iterator()

    Description

    Get an iterator for the values in this document.

    Returns

    a ValueIterator object which can be passed to foreach()


    Method term_iterator

    object(TermIterator) Public.Xapian.Document()->term_iterator()

    Description

    Get an iterator for the terms in this document.

    Returns

    a TermIterator object which can be passed to foreach()


    Method clear_terms

    void Public.Xapian.Document()->clear_terms()

    Description

    Remove all terms (and postings) from the document.


    Method clear_values

    void Public.Xapian.Document()->clear_values()

    Description

    Remove all values associated with the document.


    Method get_data

    string Public.Xapian.Document()->get_data()

    Description

    Get data stored in the document. This is a potentially expensive operation, and shouldn't normally be used in a match decider function. Put data for use by match deciders in a value instead.

    Returns

    Method get_description

    string Public.Xapian.Document()->get_description()

    Returns

    Method get_value

    string Public.Xapian.Document()->get_value(int val)

    Description

    Get value by number.

    Parameter val

    The number of the value.

    Returns

    Returns an empty string if no value with the given number is present in the document.


    Method remove_value

    void Public.Xapian.Document()->remove_value(int val)

    Description

    Remove any value with the given number.


    Method add_term

    void Public.Xapian.Document()->add_term(string tname, int termcount)

    Description

    Add a term to the document, without positional information.

    Any existing positional information for the term will be left unmodified.

    Parameter tname

    The name of the term.

    Parameter termcount

    The increment that will be applied to the wdf for this term.


    Method add_posting

    void Public.Xapian.Document()->add_posting(string tname, int termpos, int termcount)

    Description

    Add an occurrence of a term at a particular position.

    Multiple occurrences of the term at the same position are represented only once in the positional information, but do increase the wdf.

    If the term is not already in the document, it will be added to it.

    Parameter tname

    The name of the term.

    Parameter termpos

    The position of the term.

    Parameter termcount

    The increment that will be applied to the wdf for this term.


    Method remove_term

    void Public.Xapian.Document()->remove_term(string tname)

    Description

    Remove a term and all postings associated with it.

    Parameter tname

    The name of the term.

    An error will be thrown if the term is not present in the document.


    Method remove_posting

    void Public.Xapian.Document()->remove_posting(string tname, int tpos, int wdfdec)

    Description

    Remove a posting of a term from the document.

    Note that the term will still index the document even if all occurrences are removed. To remove a term from a document completely, use remove_term().

    Parameter tname

    The name of the term.

    Parameter tpos

    The position of the term.

    Parameter wdfdec

    The decrement that will be applied to the wdf when removing this posting. The wdf will not go below the value of 0.

    Note

    An error will be thrown if the term is not at the position specified in the position list for this term in this document or if the term is not in the document.


    Method add_value

    void Public.Xapian.Document()->add_value(int valueno, string value)

    Description

    Add a new value.

    It will replace any existing value with the same number.


    Method termlist_count

    int Public.Xapian.Document()->termlist_count()

    Description

    Count the terms in this document.

    Returns

    the number of terms in the document.


    Method values_count

    int Public.Xapian.Document()->values_count()

    Description

    Count the values in this document.

    Returns

    the number of values in the document.

      CLASS Public.Xapian.MSetIterator
      CLASS Public.Xapian.ESetIterator
      CLASS Public.Xapian.MSet
    Methods
    back()
    begin()
    create()
    end()
    fetch()
    get_description()
    get_firstitem()
    get_matches_estimated()
    get_matches_lower_bound()
    get_matches_upper_bound()
    size()

    Method create

    void Public.Xapian.MSet()->create()


    Method begin

    object Public.Xapian.MSet()->begin()

    Returns

    Method end

    object Public.Xapian.MSet()->end()

    Returns

    Method back

    object Public.Xapian.MSet()->back()

    Returns

    Method fetch

    void Public.Xapian.MSet()->fetch()


    Method size

    int Public.Xapian.MSet()->size()

    Returns

    Method get_matches_estimated

    int Public.Xapian.MSet()->get_matches_estimated()

    Returns

    Method get_matches_upper_bound

    int Public.Xapian.MSet()->get_matches_upper_bound()

    Returns

    Method get_firstitem

    int Public.Xapian.MSet()->get_firstitem()

    Returns

    Method get_matches_lower_bound

    int Public.Xapian.MSet()->get_matches_lower_bound()

    Returns

    Method get_description

    string Public.Xapian.MSet()->get_description()

    Returns
      CLASS Public.Xapian.RSet
    Methods
    add_document()
    add_document()
    contains()
    contains()
    create()
    empty()
    get_description()
    remove_document()
    remove_document()
    size()

    Method create

    void Public.Xapian.RSet()->create()


    Method size

    int Public.Xapian.RSet()->size()

    Returns

    Method empty

    int Public.Xapian.RSet()->empty()

    Returns

    Method add_document

    void Public.Xapian.RSet()->add_document(int docid)


    Method add_document

    void Public.Xapian.RSet()->add_document(object iterator)


    Method remove_document

    void Public.Xapian.RSet()->remove_document(int docid)


    Method remove_document

    void Public.Xapian.RSet()->remove_document(object iterator)


    Method contains

    int Public.Xapian.RSet()->contains(int docid)

    Returns

    Method contains

    int Public.Xapian.RSet()->contains(object iterator)

    Returns

    Method get_description

    string Public.Xapian.RSet()->get_description()

    Returns
      CLASS Public.Xapian.ESet
    Methods
    `[]()
    back()
    begin()
    create()
    empty()
    end()
    get_description()
    get_ebound()
    max_size()
    size()

    Method create

    void Public.Xapian.ESet()->create()


    Method begin

    object Public.Xapian.ESet()->begin()

    Returns

    Method end

    object Public.Xapian.ESet()->end()

    Returns

    Method back

    object Public.Xapian.ESet()->back()

    Returns

    Method `[]

    object Public.Xapian.ESet()->`[](int i)

    Returns

    Method size

    int Public.Xapian.ESet()->size()

    Returns

    Method empty

    int Public.Xapian.ESet()->empty()

    Returns

    Method max_size

    int Public.Xapian.ESet()->max_size()

    Returns

    Method get_ebound

    int Public.Xapian.ESet()->get_ebound()

    Returns

    Method get_description

    string Public.Xapian.ESet()->get_description()

    Returns
      CLASS Public.Xapian.Database
    Methods
    create()
    create()
    destroy()
    get_avlength()
    get_description()
    get_doccount()
    get_doclength()
    get_document()
    get_lastdocid()
    get_spelling_suggestion()
    get_spelling_terms()
    get_synonym_terms()
    has_positions()
    keep_alive()
    reopen()
    synonyms_iterator()

    Method create

    void Public.Xapian.Database()->create(string path)


    Method create

    void Public.Xapian.Database()->create()


    Method reopen

    void Public.Xapian.Database()->reopen()


    Method keep_alive

    void Public.Xapian.Database()->keep_alive()


    Method get_doclength

    int Public.Xapian.Database()->get_doclength(int did)

    Returns

    Method get_doccount

    int Public.Xapian.Database()->get_doccount()

    Returns

    Method get_avlength

    int Public.Xapian.Database()->get_avlength()

    Returns

    Method get_lastdocid

    int Public.Xapian.Database()->get_lastdocid()

    Returns

    Method has_positions

    int Public.Xapian.Database()->has_positions()

    Returns

    Method synonyms_iterator

    object(TermIterator) Public.Xapian.Database()->synonyms_iterator(string term)

    Description

    Get an iterator for the synonyms of a term.

    Returns

    a TermIterator object which can be passed to foreach()


    Method get_document

    object Public.Xapian.Database()->get_document(int id)

    Returns

    Method get_spelling_terms

    object Public.Xapian.Database()->get_spelling_terms()

    Returns

    a TermIterator object which can also be passed to foreach()


    Method get_synonym_terms

    object Public.Xapian.Database()->get_synonym_terms()

    Returns

    a TermIterator object which can also be passed to foreach()


    Method get_spelling_suggestion

    string Public.Xapian.Database()->get_spelling_suggestion(string word, int max_edit_distance)

    Description

    Suggest a spelling correction.

    Parameter word

    The potentially misspelled word.

    Parameter max_edit_distance

    Only consider words which are at most max_edit_distance edits from word. An edit is a character insertion, deletion, or the transposition of two adjacent characters (a reasonable starting value is 2).


    Method get_description

    string Public.Xapian.Database()->get_description()

    Returns

    Method destroy

    void Public.Xapian.Database()->destroy()

      CLASS Public.Xapian.WriteableDatabase
    Methods
    add_document()
    begin_transaction()
    cancel_transaction()
    commit_transaction()
    create()
    delete_document()
    delete_document()
    flush()
    get_description()
    replace_document()
    replace_document()

    Inherit Database

  • Database

  • Method create

    void Public.Xapian.WriteableDatabase()->create(string path, int mode)


    Method flush

    void Public.Xapian.WriteableDatabase()->flush()


    Method add_document

    int Public.Xapian.WriteableDatabase()->add_document(object document)

    Returns

    Method replace_document

    void Public.Xapian.WriteableDatabase()->replace_document(int did, object document)


    Method replace_document

    void Public.Xapian.WriteableDatabase()->replace_document(string term, object document)


    Method delete_document

    void Public.Xapian.WriteableDatabase()->delete_document(string unique_term)


    Method delete_document

    void Public.Xapian.WriteableDatabase()->delete_document(int did)


    Method begin_transaction

    void Public.Xapian.WriteableDatabase()->begin_transaction(int flushed)


    Method commit_transaction

    void Public.Xapian.WriteableDatabase()->commit_transaction()


    Method cancel_transaction

    void Public.Xapian.WriteableDatabase()->cancel_transaction()


    Method get_description

    string Public.Xapian.WriteableDatabase()->get_description()

    Returns
      CLASS Public.Xapian.QueryParser
    Methods
    add_boolean_prefix()
    add_prefix()
    create()
    get_corrected_query_string()
    get_description()
    parse_query()
    set_database()
    set_default_op()
    set_stemmer()
    set_stemming_strategy()
    set_stopper()

    Method create

    void Public.Xapian.QueryParser()->create()


    Method get_corrected_query_string

    string Public.Xapian.QueryParser()->get_corrected_query_string()


    Method set_stemmer

    void Public.Xapian.QueryParser()->set_stemmer(object stemmer)


    Method set_stopper

    void Public.Xapian.QueryParser()->set_stopper(object stopper)


    Method set_database

    void Public.Xapian.QueryParser()->set_database(object database)


    Method set_default_op

    void Public.Xapian.QueryParser()->set_default_op(int op)


    Method set_stemming_strategy

    void Public.Xapian.QueryParser()->set_stemming_strategy(int strat)

    Description

    Set the stemming strategy.

    This controls how the query parser will apply the stemming algorithm. The default value is STEM_NONE. The possible values are:

    * STEM_NONE: Don't perform any stemming.

    * STEM_SOME: Search for stemmed forms of terms except for those which start with a capital letter, or are followed by certain characters (currently: (/@<>=*[{" ), or are used with operators which need positional information. Stemmed terms are prefixed with 'Z'.

    * STEM_ALL: Search for stemmed forms of all words (note: no 'Z' prefix is added).

    Note that the stemming algorithm is only applied to words in probabilistic fields - boolean filter terms are never stemmed.


    Method parse_query

    object Public.Xapian.QueryParser()->parse_query(string query, int flags)

    Parameter query

    a plain text query string

    Returns

    a Query object

    Note

    this function is wide-string aware


    Method add_prefix

    void Public.Xapian.QueryParser()->add_prefix(string field, string prefix)


    Method add_boolean_prefix

    void Public.Xapian.QueryParser()->add_boolean_prefix(string field, string prefix)


    Method get_description

    string Public.Xapian.QueryParser()->get_description()

    Returns
      CLASS Public.Xapian.Enquire
    Methods
    create()
    get_description()
    get_eset()
    get_eset()
    get_matching_terms()
    get_mset()
    get_mset()
    get_query()
    set_collapse_key()
    set_cutoff()
    set_docid_order()
    set_query()
    set_sort_by_relevance_then_value()
    set_sort_by_relevence()
    set_sort_by_value_then_relevance()
    set_sort_value()
    set_weighting_scheme()

    Method create

    void Public.Xapian.Enquire()->create(object database)


    Method set_weighting_scheme

    void Public.Xapian.Enquire()->set_weighting_scheme(object weight)


    Method set_query

    void Public.Xapian.Enquire()->set_query(object query, int termcount)


    Method set_cutoff

    void Public.Xapian.Enquire()->set_cutoff(int percent_cutoff, float weight_cutoff)


    Method set_docid_order

    void Public.Xapian.Enquire()->set_docid_order(int docid_order)


    Method set_collapse_key

    void Public.Xapian.Enquire()->set_collapse_key(int collapse_key)


    Method set_sort_by_relevance_then_value

    void Public.Xapian.Enquire()->set_sort_by_relevance_then_value(int sort_key, int ascending)


    Method set_sort_by_value_then_relevance

    void Public.Xapian.Enquire()->set_sort_by_value_then_relevance(int sort_key, int ascending)


    Method set_sort_value

    void Public.Xapian.Enquire()->set_sort_value(int sort_key, int ascending)


    Method set_sort_by_relevence

    void Public.Xapian.Enquire()->set_sort_by_relevence()


    Method get_query

    object Public.Xapian.Enquire()->get_query()

    Returns

    Method get_mset

    object Public.Xapian.Enquire()->get_mset(int first, int maxitems, object rset, function|void mdecider)

    Returns

    Method get_mset

    object Public.Xapian.Enquire()->get_mset(int first, int maxitems, int checkatleast)

    Returns

    Method get_eset

    object Public.Xapian.Enquire()->get_eset(int maxitems, object rset, function|void edecider)

    Returns

    Method get_eset

    object Public.Xapian.Enquire()->get_eset(int maxitems, object rset, int flags, float k, function|void edecider)

    Returns

    Method get_matching_terms

    object Public.Xapian.Enquire()->get_matching_terms(int docid)

    Returns

    a TermIterator object which can also be passed to foreach()


    Method get_description

    string Public.Xapian.Enquire()->get_description()

    Returns
      CLASS Public.Xapian.TermGenerator
    Methods
    destroy()
    get_description()
    get_document()
    get_termpos()
    index_text()
    index_text_without_positions()
    set_database()
    set_document()
    set_stemmer()
    set_stopper()
    set_termpos()

    Method set_document

    void Public.Xapian.TermGenerator()->set_document(object document)

    Returns

    Method get_document

    object Public.Xapian.TermGenerator()->get_document()


    Method set_stemmer

    void Public.Xapian.TermGenerator()->set_stemmer(object stemmer)


    Method set_stopper

    void Public.Xapian.TermGenerator()->set_stopper(object stopper)


    Method set_database

    void Public.Xapian.TermGenerator()->set_database(object database)


    Method set_termpos

    void Public.Xapian.TermGenerator()->set_termpos(int termpos)


    Method get_termpos

    int Public.Xapian.TermGenerator()->get_termpos()


    Method index_text

    void Public.Xapian.TermGenerator()->index_text(string text, int weight, string prefix)

    Note

    this function is wide-string aware.


    Method index_text_without_positions

    void Public.Xapian.TermGenerator()->index_text_without_positions(string text, int weight, string prefix)

    Note

    this function is wide-string aware.


    Method get_description

    string Public.Xapian.TermGenerator()->get_description()

    Returns

    Method destroy

    void Public.Xapian.TermGenerator()->destroy()

    gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University