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

Lucy::Search::TermQuery

parcel Lucy
class variable LUCY_TERMQUERY
struct symbol lucy_TermQuery
class nickname lucy_TermQuery
header file Lucy/Search/TermQuery.h

Name

Lucy::Search::TermQuery – Query which matches individual terms.

Description

TermQuery is a subclass of Query for matching individual terms in a specific field.

Functions

new
lucy_TermQuery* // incremented
lucy_TermQuery_new(
    cfish_String *field,
    cfish_Obj *term
);

Create a new TermQuery.

field

Field name.

term

Term text.

init
lucy_TermQuery*
lucy_TermQuery_init(
    lucy_TermQuery *self,
    cfish_String *field,
    cfish_Obj *term
);

Initialize a TermQuery.

field

Field name.

term

Term text.

Methods

Get_Field
cfish_String*
lucy_TermQuery_Get_Field(
    lucy_TermQuery *self
);

Accessor for object’s field member.

Get_Term
cfish_Obj*
lucy_TermQuery_Get_Term(
    lucy_TermQuery *self
);

Accessor for object’s term member.

Make_Compiler
lucy_Compiler* // incremented
lucy_TermQuery_Make_Compiler(
    lucy_TermQuery *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.

To_String
cfish_String* // incremented
lucy_TermQuery_To_String(
    lucy_TermQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Dump
cfish_Obj* // incremented
lucy_TermQuery_Dump(
    lucy_TermQuery *self
);
Load
cfish_Obj* // incremented
lucy_TermQuery_Load(
    lucy_TermQuery *self,
    cfish_Obj *dump
);
Equals
bool
lucy_TermQuery_Equals(
    lucy_TermQuery *self,
    cfish_Obj *other
);

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

other

Another Obj.

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_TermQuery_Set_Boost(
    lucy_TermQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_TermQuery_Get_Boost(
    lucy_TermQuery *self
);

Get the Query’s boost.

Inheritance

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