Lucy::Search::Query – A specification for a search query.
Query objects are simple containers which contain the minimum information necessary to define a search query.
The most common way to generate Query objects is to feed a search string such as ‘foo AND bar’ to a QueryParser’s Parse() method, which outputs an abstract syntax tree built up from various Query subclasses such as ANDQuery and TermQuery. However, it is also possible to use custom Query objects to build a search specification which cannot be easily represented using a search string.
lucy_Query* lucy_Query_init( lucy_Query *self, float boost );
A scoring multiplier, affecting the Query’s relative contribution to each document’s score. Typically defaults to 1.0, but subclasses which do not contribute to document scores such as NOTQuery and MatchAllQuery default to 0.0 instead.
lucy_Compiler* // incremented lucy_Query_Make_Compiler( lucy_Query *self, lucy_Searcher *searcher, float boost, bool subordinate );
Abstract factory method returning a Compiler derived from this Query.
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.
void lucy_Query_Set_Boost( lucy_Query *self, float boost );
Set the Query’s boost.
float lucy_Query_Get_Boost( lucy_Query *self );
Get the Query’s boost.
cfish_Obj* // incremented lucy_Query_Dump( lucy_Query *self );
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.