Project Lucy has retired. For details please refer to its Attic page.
Lucy::Search::PhraseQuery – C API Documentation
Apache Lucy™

Lucy::Search::PhraseQuery

parcel Lucy
class variable LUCY_PHRASEQUERY
struct symbol lucy_PhraseQuery
class nickname lucy_PhraseQuery
header file Lucy/Search/PhraseQuery.h

Name

Lucy::Search::PhraseQuery – Query matching an ordered list of terms.

Description

PhraseQuery is a subclass of Query for matching against an ordered sequence of terms.

Functions

new
lucy_PhraseQuery* // incremented
lucy_PhraseQuery_new(
    cfish_String *field,
    cfish_Vector *terms
);

Create a new PhraseQuery.

field

The field that the phrase must occur in.

terms

The ordered array of terms that must match.

init
lucy_PhraseQuery*
lucy_PhraseQuery_init(
    lucy_PhraseQuery *self,
    cfish_String *field,
    cfish_Vector *terms
);

Initialize a PhraseQuery.

field

The field that the phrase must occur in.

terms

The ordered array of terms that must match.

Methods

Get_Field
cfish_String*
lucy_PhraseQuery_Get_Field(
    lucy_PhraseQuery *self
);

Accessor for object’s field attribute.

Get_Terms
cfish_Vector*
lucy_PhraseQuery_Get_Terms(
    lucy_PhraseQuery *self
);

Accessor for object’s array of terms.

Make_Compiler
lucy_Compiler* // incremented
lucy_PhraseQuery_Make_Compiler(
    lucy_PhraseQuery *self,
    lucy_Searcher *searcher,
    float boost,
    bool subordinate
);

Abstract factory method returning a Compiler derived from this Query.

searcher

A Searcher.

boost

A scoring multiplier.

subordinate

Indicates whether the Query is a subquery (as opposed to a top-level query). If false, the implementation must invoke Normalize() on the newly minted Compiler object before returning it.

Equals
bool
lucy_PhraseQuery_Equals(
    lucy_PhraseQuery *self,
    cfish_Obj *other
);

Indicate whether two objects are the same. By default, compares the memory address.

other

Another Obj.

To_String
cfish_String* // incremented
lucy_PhraseQuery_To_String(
    lucy_PhraseQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Dump
cfish_Obj* // incremented
lucy_PhraseQuery_Dump(
    lucy_PhraseQuery *self
);
Load
cfish_Obj* // incremented
lucy_PhraseQuery_Load(
    lucy_PhraseQuery *self,
    cfish_Obj *dump
);

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_PhraseQuery_Set_Boost(
    lucy_PhraseQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_PhraseQuery_Get_Boost(
    lucy_PhraseQuery *self
);

Get the Query’s boost.

Inheritance

Lucy::Search::PhraseQuery is a Lucy::Search::Query is a Clownfish::Obj.