GLSearchFilter


@interface GLSearchFilter : NSObject

GLSearchFilter class contains a set of parameters that defines filter for GLSearch

  • Unavailable

    Empty filter is not allowed. Please use proper init method.

    Default constructor is disabled.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • Creates new filter to search objects with string “query”. Uses default tag set and match type. Default tag set is GLSearchTagSetMask_All Default match type is GLSearchMatchType_WordStart

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithQuery:(NSString *_Nonnull)query;

    Parameters

    query

    Part of word, word or phrase to search

    Return Value

    Filter instance

  • Creates new filter to search objects with string “query” set for tag “tag”. Default match type is GLSearchMatchType_Exact

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithQuery:(NSString *_Nonnull)query
                                       tag:(NSString *_Nonnull)tag;

    Parameters

    query

    Expected value of tag

    tag

    Tag

    Return Value

    Filter instance

  • Creates new filter to search objects with string “query” inside tags sets

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithQuery:(NSString *_Nonnull)query
                                tagSetMask:(GLSearchTagSetMask)tagSetMask;

    Parameters

    query

    Part of word, word or phrase to search

    tagSetMask

    Set of tags where query could be found

    Return Value

    Filter instance

  • Creates new filter to search objects from category

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithCategory:(GLSearchCategory *_Nonnull)category;

    Parameters

    category

    Category

  • Adds tag using it’s hash Tag hashes could be found in vector object returned from search or found on map

    Declaration

    Objective-C

    - (void)addTagHash:(uint32_t)tagHash;

    Parameters

    tagHash

    Hash of the tag

  • Adds tag to search filter

    Declaration

    Objective-C

    - (void)addTag:(NSString *_Nonnull)tag;

    Parameters

    tag

    Tag

  • Adds additional tags to search filter

    Declaration

    Objective-C

    - (void)addTags:(NSArray<NSString *> *_Nonnull)tags;

    Parameters

    tags

    Tags array

  • Sets how we should compare query string with values of objects. Default match type is MatchType.WORD_START

    Declaration

    Objective-C

    @property GLSearchMatchType matchType;