parcel | Lucy |
class variable | LUCY_REQUIREDOPTIONALQUERY |
struct symbol | lucy_RequiredOptionalQuery |
class nickname | lucy_ReqOptQuery |
header file | Lucy/Search/RequiredOptionalQuery.h |
Lucy::Search::RequiredOptionalQuery – Join results for two Queries, one required, one optional.
RequiredOptionalQuery joins the result sets of one Query which MUST match, and one Query which SHOULD match. When only the required Query matches, its score is passed along; when both match, the scores are summed.
lucy_RequiredOptionalQuery* // incremented
lucy_ReqOptQuery_new(
lucy_Query *required_query,
lucy_Query *optional_query
);
Create a new RequiredOptionalQuery.
Query must must match.
Query which should match.
lucy_RequiredOptionalQuery*
lucy_ReqOptQuery_init(
lucy_RequiredOptionalQuery *self,
lucy_Query *required_query,
lucy_Query *optional_query
);
Initialize a RequiredOptionalQuery.
Query must must match.
Query which should match.
lucy_Query*
lucy_ReqOptQuery_Get_Required_Query(
lucy_RequiredOptionalQuery *self
);
Getter for the required Query.
void
lucy_ReqOptQuery_Set_Required_Query(
lucy_RequiredOptionalQuery *self,
lucy_Query *required_query
);
Setter for the required Query.
lucy_Query*
lucy_ReqOptQuery_Get_Optional_Query(
lucy_RequiredOptionalQuery *self
);
Getter for the optional Query.
void
lucy_ReqOptQuery_Set_Optional_Query(
lucy_RequiredOptionalQuery *self,
lucy_Query *optional_query
);
Setter for the optional Query.
lucy_Compiler* // incremented
lucy_ReqOptQuery_Make_Compiler(
lucy_RequiredOptionalQuery *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_ReqOptQuery_To_String(
lucy_RequiredOptionalQuery *self
);
Generic stringification: “ClassName@hex_mem_address”.
bool
lucy_ReqOptQuery_Equals(
lucy_RequiredOptionalQuery *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
void
lucy_ReqOptQuery_Add_Child(
lucy_RequiredOptionalQuery *self,
lucy_Query *query
);
Add a child Query node.
cfish_Obj* // incremented
lucy_ReqOptQuery_Dump(
lucy_RequiredOptionalQuery *self
);
cfish_Obj* // incremented
lucy_ReqOptQuery_Load(
lucy_RequiredOptionalQuery *self,
cfish_Obj *dump
);
void
lucy_ReqOptQuery_Set_Boost(
lucy_RequiredOptionalQuery *self,
float boost
);
Set the Query’s boost.
float
lucy_ReqOptQuery_Get_Boost(
lucy_RequiredOptionalQuery *self
);
Get the Query’s boost.
Lucy::Search::RequiredOptionalQuery 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.