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

Lucy::Search::NOTQuery

parcel Lucy
class variable LUCY_NOTQUERY
struct symbol lucy_NOTQuery
class nickname lucy_NOTQuery
header file Lucy/Search/NOTQuery.h

Name

Lucy::Search::NOTQuery – Invert the result set of another Query.

Description

A NOTQuery wraps another Query and matches against its inverse document set. All matching docs recieve a score of 0.0.

NOTQuery is often used in conjunction with ANDQuery to provide “a AND NOT b” semantics.

Functions

new
lucy_NOTQuery* // incremented
lucy_NOTQuery_new(
    lucy_Query *negated_query
);

Create a new NOTQuery.

negated_query

The Query whose result set should be inverted.

init
lucy_NOTQuery*
lucy_NOTQuery_init(
    lucy_NOTQuery *self,
    lucy_Query *negated_query
);

Initialize a NOTQuery.

negated_query

The Query whose result set should be inverted.

Methods

Get_Negated_Query
lucy_Query*
lucy_NOTQuery_Get_Negated_Query(
    lucy_NOTQuery *self
);

Accessor for the object’s negated query.

Set_Negated_Query
void
lucy_NOTQuery_Set_Negated_Query(
    lucy_NOTQuery *self,
    lucy_Query *negated_query
);

Setter for the object’s negated query.

Make_Compiler
lucy_Compiler* // incremented
lucy_NOTQuery_Make_Compiler(
    lucy_NOTQuery *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_NOTQuery_To_String(
    lucy_NOTQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Equals
bool
lucy_NOTQuery_Equals(
    lucy_NOTQuery *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_NOTQuery_Add_Child(
    lucy_NOTQuery *self,
    lucy_Query *query
);

Add a child Query node.

Dump
cfish_Obj* // incremented
lucy_NOTQuery_Dump(
    lucy_NOTQuery *self
);
Load
cfish_Obj* // incremented
lucy_NOTQuery_Load(
    lucy_NOTQuery *self,
    cfish_Obj *dump
);

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_NOTQuery_Set_Boost(
    lucy_NOTQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_NOTQuery_Get_Boost(
    lucy_NOTQuery *self
);

Get the Query’s boost.

Inheritance

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