parcel | Lucy |
class variable | LUCY_RANGEQUERY |
struct symbol | lucy_RangeQuery |
class nickname | lucy_RangeQuery |
header file | Lucy/Search/RangeQuery.h |
Lucy::Search::RangeQuery – Match a range of values.
RangeQuery matches documents where the value for a particular field falls within a given range.
lucy_RangeQuery* // incremented
lucy_RangeQuery_new(
cfish_String *field,
cfish_Obj *lower_term,
cfish_Obj *upper_term,
bool include_lower,
bool include_upper
);
Create a new RangeQuery.
Takes 5 parameters; field
is required, as is at least one of either
lower_term
or upper_term
.
The name of a sortable
field.
Lower delimiter. If not supplied, all values
less than upper_term
will pass.
Upper delimiter. If not supplied, all values greater
than lower_term
will pass.
Indicates whether docs which match
lower_term
should be included in the results.
Indicates whether docs which match
upper_term
should be included in the results.
lucy_RangeQuery*
lucy_RangeQuery_init(
lucy_RangeQuery *self,
cfish_String *field,
cfish_Obj *lower_term,
cfish_Obj *upper_term,
bool include_lower,
bool include_upper
);
Initialize a RangeQuery. See new() for a description of the parameters.
bool
lucy_RangeQuery_Equals(
lucy_RangeQuery *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
cfish_String* // incremented
lucy_RangeQuery_To_String(
lucy_RangeQuery *self
);
Generic stringification: “ClassName@hex_mem_address”.
lucy_Compiler* // incremented
lucy_RangeQuery_Make_Compiler(
lucy_RangeQuery *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_Obj* // incremented
lucy_RangeQuery_Dump(
lucy_RangeQuery *self
);
cfish_Obj* // incremented
lucy_RangeQuery_Load(
lucy_RangeQuery *self,
cfish_Obj *dump
);
void
lucy_RangeQuery_Set_Boost(
lucy_RangeQuery *self,
float boost
);
Set the Query’s boost.
float
lucy_RangeQuery_Get_Boost(
lucy_RangeQuery *self
);
Get the Query’s boost.
Lucy::Search::RangeQuery 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.