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

Lucy::Search::PolyQuery

parcel Lucy
class variable LUCY_POLYQUERY
struct symbol lucy_PolyQuery
class nickname lucy_PolyQuery
header file Lucy/Search/PolyQuery.h

Name

Lucy::Search::PolyQuery – Base class for composite Query objects.

Description

PolyQuery serves as a shared base class for ANDQuery, ORQuery, NOTQuery, and RequiredOptionalQuery. All of these classes may serve as nodes in composite Query with a tree structure which may be walked.

Methods

Add_Child
void
lucy_PolyQuery_Add_Child(
    lucy_PolyQuery *self,
    lucy_Query *query
);

Add a child Query node.

Dump
cfish_Obj* // incremented
lucy_PolyQuery_Dump(
    lucy_PolyQuery *self
);
Load
cfish_Obj* // incremented
lucy_PolyQuery_Load(
    lucy_PolyQuery *self,
    cfish_Obj *dump
);
Equals
bool
lucy_PolyQuery_Equals(
    lucy_PolyQuery *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

Make_Compiler (abstract)
lucy_Compiler* // incremented
lucy_PolyQuery_Make_Compiler(
    lucy_PolyQuery *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.

Set_Boost
void
lucy_PolyQuery_Set_Boost(
    lucy_PolyQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_PolyQuery_Get_Boost(
    lucy_PolyQuery *self
);

Get the Query’s boost.

Inheritance

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