Project Lucy has retired. For details please refer to its Attic page.
Lucy::Search::LeafQuery – C API Documentation
Apache Lucy™

Lucy::Search::LeafQuery

parcel Lucy
class variable LUCY_LEAFQUERY
struct symbol lucy_LeafQuery
class nickname lucy_LeafQuery
header file Lucy/Search/LeafQuery.h

Name

Lucy::Search::LeafQuery – Leaf node in a tree created by QueryParser.

Description

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.

Functions

new
lucy_LeafQuery* // incremented
lucy_LeafQuery_new(
    cfish_String *field,
    cfish_String *text
);

Create a new LeafQuery.

field

Optional field name.

text

Raw query text.

init
lucy_LeafQuery*
lucy_LeafQuery_init(
    lucy_LeafQuery *self,
    cfish_String *field,
    cfish_String *text
);

Initialize a LeafQuery.

field

Optional field name.

text

Raw query text.

Methods

Get_Field
cfish_String*
lucy_LeafQuery_Get_Field(
    lucy_LeafQuery *self
);

Accessor for object’s field attribute.

Get_Text
cfish_String*
lucy_LeafQuery_Get_Text(
    lucy_LeafQuery *self
);

Accessor for object’s text attribute.

Equals
bool
lucy_LeafQuery_Equals(
    lucy_LeafQuery *self,
    cfish_Obj *other
);

Indicate whether two objects are the same. By default, compares the memory address.

other

Another Obj.

To_String
cfish_String* // incremented
lucy_LeafQuery_To_String(
    lucy_LeafQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Dump
cfish_Obj* // incremented
lucy_LeafQuery_Dump(
    lucy_LeafQuery *self
);
Load
cfish_Obj* // incremented
lucy_LeafQuery_Load(
    lucy_LeafQuery *self,
    cfish_Obj *dump
);
Make_Compiler
lucy_Compiler* // incremented
lucy_LeafQuery_Make_Compiler(
    lucy_LeafQuery *self,
    lucy_Searcher *searcher,
    float boost,
    bool subordinate
);

Throws an error.

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_LeafQuery_Set_Boost(
    lucy_LeafQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_LeafQuery_Get_Boost(
    lucy_LeafQuery *self
);

Get the Query’s boost.

Inheritance

Lucy::Search::LeafQuery is a Lucy::Search::Query is a Clownfish::Obj.