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

Lucy::Search::ORQuery

parcel Lucy
class variable LUCY_ORQUERY
struct symbol lucy_ORQuery
class nickname lucy_ORQuery
header file Lucy/Search/ORQuery.h

Name

Lucy::Search::ORQuery – Union multiple result sets.

Description

ORQuery is a composite Query which matches when any of its children match, so its result set is the union of their result sets. Matching documents recieve a summed score from all matching child Queries.

Functions

new
lucy_ORQuery* // incremented
lucy_ORQuery_new(
    cfish_Vector *children
);

Create a new ORQuery.

children

An array of child Queries.

init
lucy_ORQuery*
lucy_ORQuery_init(
    lucy_ORQuery *self,
    cfish_Vector *children
);

Initialize an ORQuery.

children

An array of child Queries.

Methods

Make_Compiler
lucy_Compiler* // incremented
lucy_ORQuery_Make_Compiler(
    lucy_ORQuery *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_ORQuery_To_String(
    lucy_ORQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Equals
bool
lucy_ORQuery_Equals(
    lucy_ORQuery *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::PolyQuery

Add_Child
void
lucy_ORQuery_Add_Child(
    lucy_ORQuery *self,
    lucy_Query *query
);

Add a child Query node.

Dump
cfish_Obj* // incremented
lucy_ORQuery_Dump(
    lucy_ORQuery *self
);
Load
cfish_Obj* // incremented
lucy_ORQuery_Load(
    lucy_ORQuery *self,
    cfish_Obj *dump
);

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_ORQuery_Set_Boost(
    lucy_ORQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_ORQuery_Get_Boost(
    lucy_ORQuery *self
);

Get the Query’s boost.

Inheritance

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