parcel | Lucy |
class variable | LUCY_LEAFQUERY |
struct symbol | lucy_LeafQuery |
class nickname | lucy_LeafQuery |
header file | Lucy/Search/LeafQuery.h |
Lucy::Search::LeafQuery – Leaf node in a tree created by QueryParser.
LeafQuery objects serve as leaf nodes in the tree structure generated by QueryParser’s Tree() method. Ultimately, they must be transformed, typically into either TermQuery or PhraseQuery objects, as attempting to search a LeafQuery causes an error.
lucy_LeafQuery* // incremented
lucy_LeafQuery_new(
cfish_String *field,
cfish_String *text
);
Create a new LeafQuery.
Optional field name.
Raw query text.
lucy_LeafQuery*
lucy_LeafQuery_init(
lucy_LeafQuery *self,
cfish_String *field,
cfish_String *text
);
Initialize a LeafQuery.
Optional field name.
Raw query text.
cfish_String*
lucy_LeafQuery_Get_Field(
lucy_LeafQuery *self
);
Accessor for object’s field
attribute.
cfish_String*
lucy_LeafQuery_Get_Text(
lucy_LeafQuery *self
);
Accessor for object’s text
attribute.
bool
lucy_LeafQuery_Equals(
lucy_LeafQuery *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
cfish_String* // incremented
lucy_LeafQuery_To_String(
lucy_LeafQuery *self
);
Generic stringification: “ClassName@hex_mem_address”.
cfish_Obj* // incremented
lucy_LeafQuery_Dump(
lucy_LeafQuery *self
);
cfish_Obj* // incremented
lucy_LeafQuery_Load(
lucy_LeafQuery *self,
cfish_Obj *dump
);
lucy_Compiler* // incremented
lucy_LeafQuery_Make_Compiler(
lucy_LeafQuery *self,
lucy_Searcher *searcher,
float boost,
bool subordinate
);
Throws an error.
void
lucy_LeafQuery_Set_Boost(
lucy_LeafQuery *self,
float boost
);
Set the Query’s boost.
float
lucy_LeafQuery_Get_Boost(
lucy_LeafQuery *self
);
Get the Query’s boost.
Lucy::Search::LeafQuery 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.