parcel | Lucy |
class variable | LUCY_NOTQUERY |
struct symbol | lucy_NOTQuery |
class nickname | lucy_NOTQuery |
header file | Lucy/Search/NOTQuery.h |
Lucy::Search::NOTQuery – Invert the result set of another Query.
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.
lucy_NOTQuery* // incremented
lucy_NOTQuery_new(
lucy_Query *negated_query
);
Create a new NOTQuery.
The Query whose result set should be inverted.
lucy_NOTQuery*
lucy_NOTQuery_init(
lucy_NOTQuery *self,
lucy_Query *negated_query
);
Initialize a NOTQuery.
The Query whose result set should be inverted.
lucy_Query*
lucy_NOTQuery_Get_Negated_Query(
lucy_NOTQuery *self
);
Accessor for the object’s negated query.
void
lucy_NOTQuery_Set_Negated_Query(
lucy_NOTQuery *self,
lucy_Query *negated_query
);
Setter for the object’s negated query.
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.
A Searcher.
A scoring multiplier.
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.
cfish_String* // incremented
lucy_NOTQuery_To_String(
lucy_NOTQuery *self
);
Generic stringification: “ClassName@hex_mem_address”.
bool
lucy_NOTQuery_Equals(
lucy_NOTQuery *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
void
lucy_NOTQuery_Add_Child(
lucy_NOTQuery *self,
lucy_Query *query
);
Add a child Query node.
cfish_Obj* // incremented
lucy_NOTQuery_Dump(
lucy_NOTQuery *self
);
cfish_Obj* // incremented
lucy_NOTQuery_Load(
lucy_NOTQuery *self,
cfish_Obj *dump
);
void
lucy_NOTQuery_Set_Boost(
lucy_NOTQuery *self,
float boost
);
Set the Query’s boost.
float
lucy_NOTQuery_Get_Boost(
lucy_NOTQuery *self
);
Get the Query’s boost.
Lucy::Search::NOTQuery is a Lucy::Search::PolyQuery is a Lucy::Search::Query is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.