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

Lucy::Search::ANDQuery

parcel Lucy
class variable LUCY_ANDQUERY
struct symbol lucy_ANDQuery
class nickname lucy_ANDQuery
header file Lucy/Search/ANDQuery.h

Name

Lucy::Search::ANDQuery – Intersect multiple result sets.

Description

ANDQuery is a composite Query which matches only when all of its children match, so its result set is the intersection of their result sets. Documents which match receive a summed score.

Functions

new
lucy_ANDQuery* // incremented
lucy_ANDQuery_new(
    cfish_Vector *children
);

Create a new ANDQuery.

children

An array of child Queries.

init
lucy_ANDQuery*
lucy_ANDQuery_init(
    lucy_ANDQuery *self,
    cfish_Vector *children
);

Initialize an ANDQuery.

children

An array of child Queries.

Methods

Make_Compiler
lucy_Compiler* // incremented
lucy_ANDQuery_Make_Compiler(
    lucy_ANDQuery *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_ANDQuery_To_String(
    lucy_ANDQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Equals
bool
lucy_ANDQuery_Equals(
    lucy_ANDQuery *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_ANDQuery_Add_Child(
    lucy_ANDQuery *self,
    lucy_Query *query
);

Add a child Query node.

Dump
cfish_Obj* // incremented
lucy_ANDQuery_Dump(
    lucy_ANDQuery *self
);
Load
cfish_Obj* // incremented
lucy_ANDQuery_Load(
    lucy_ANDQuery *self,
    cfish_Obj *dump
);

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_ANDQuery_Set_Boost(
    lucy_ANDQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_ANDQuery_Get_Boost(
    lucy_ANDQuery *self
);

Get the Query’s boost.

Inheritance

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