parcel | Lucy |
class variable | LUCY_HITDOC |
struct symbol | lucy_HitDoc |
class nickname | lucy_HitDoc |
header file | Lucy/Document/HitDoc.h |
Lucy::Document::HitDoc – A document read from an index.
HitDoc is the search-time relative of the index-time class Doc; it is augmented by a numeric score attribute that Doc doesn’t have.
void
lucy_HitDoc_Set_Score(
lucy_HitDoc *self,
float score
);
Set score attribute.
float
lucy_HitDoc_Get_Score(
lucy_HitDoc *self
);
Get score attribute.
bool
lucy_HitDoc_Equals(
lucy_HitDoc *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
void
lucy_HitDoc_Set_Doc_ID(
lucy_HitDoc *self,
int32_t doc_id
);
Set internal Lucy document id.
int32_t
lucy_HitDoc_Get_Doc_ID(
lucy_HitDoc *self
);
Retrieve internal Lucy document id.
void
lucy_HitDoc_Store(
lucy_HitDoc *self,
cfish_String *field,
cfish_Obj *value
);
Store a field value in the Doc.
The field name
The value
void*
lucy_HitDoc_Get_Fields(
lucy_HitDoc *self
);
Return the Doc’s backing fields hash.
uint32_t
lucy_HitDoc_Get_Size(
lucy_HitDoc *self
);
Return the number of fields in the Doc.
cfish_Obj* // incremented
lucy_HitDoc_Extract(
lucy_HitDoc *self,
cfish_String *field
);
Retrieve the field’s value, or NULL if the field is not present.
cfish_Vector* // incremented
lucy_HitDoc_Field_Names(
lucy_HitDoc *self
);
Return a list of names of all fields present.
Lucy::Document::HitDoc is a Lucy::Document::Doc 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.