This project has retired. For details please refer to its Attic page.
LucyX::Search::ProximityQuery – C API Documentation
Apache Lucy™

LucyX::Search::ProximityQuery

parcel Lucy
class variable LUCY_PROXIMITYQUERY
struct symbol lucy_ProximityQuery
class nickname lucy_ProximityQuery
header file LucyX/Search/ProximityQuery.h

Name

LucyX::Search::ProximityQuery – Query matching an ordered list of terms.

Description

ProximityQuery is a subclass of Query for matching against an ordered sequence of terms.

Functions

new
lucy_ProximityQuery* // incremented
lucy_ProximityQuery_new(
    cfish_String *field,
    cfish_Vector *terms,
    uint32_t within
);

Create a new ProximityQuery.

field

The field that the phrase must occur in.

terms

The ordered array of terms that must match.

init
lucy_ProximityQuery*
lucy_ProximityQuery_init(
    lucy_ProximityQuery *self,
    cfish_String *field,
    cfish_Vector *terms,
    uint32_t within
);

Initialize a ProximityQuery.

field

The field that the phrase must occur in.

terms

The ordered array of terms that must match.

Methods

Get_Field
cfish_String*
lucy_ProximityQuery_Get_Field(
    lucy_ProximityQuery *self
);

Accessor for object’s field attribute.

Get_Terms
cfish_Vector*
lucy_ProximityQuery_Get_Terms(
    lucy_ProximityQuery *self
);

Accessor for object’s array of terms.

Get_Within
uint32_t
lucy_ProximityQuery_Get_Within(
    lucy_ProximityQuery *self
);

Accessor for object’s within attribute.

Make_Compiler
lucy_Compiler* // incremented
lucy_ProximityQuery_Make_Compiler(
    lucy_ProximityQuery *self,
    lucy_Searcher *searcher,
    float boost,
    bool subordinate
);

Abstract factory method returning a Compiler derived from this Query.

searcher

A Searcher.

boost

A scoring multiplier.

subordinate

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.

Equals
bool
lucy_ProximityQuery_Equals(
    lucy_ProximityQuery *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_ProximityQuery_To_String(
    lucy_ProximityQuery *self
);

Generic stringification: “ClassName@hex_mem_address”.

Dump
cfish_Obj* // incremented
lucy_ProximityQuery_Dump(
    lucy_ProximityQuery *self
);
Load
cfish_Obj* // incremented
lucy_ProximityQuery_Load(
    lucy_ProximityQuery *self,
    cfish_Obj *dump
);

Methods inherited from Lucy::Search::Query

Set_Boost
void
lucy_ProximityQuery_Set_Boost(
    lucy_ProximityQuery *self,
    float boost
);

Set the Query’s boost.

Get_Boost
float
lucy_ProximityQuery_Get_Boost(
    lucy_ProximityQuery *self
);

Get the Query’s boost.

Inheritance

LucyX::Search::ProximityQuery is a Lucy::Search::Query is a Clownfish::Obj.