Type alias TMappedinOfflineSearchAllOptions

TMappedinOfflineSearchAllOptions: {
    constants: {
        CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
        CATEGORY_LOCATION_NAME_WEIGHT: number;
        CATEGORY_LOCATION_TAGS_WEIGHT: number;
        CATEGORY_NAME_WEIGHT: number;
        LOCATION_DEFAULT_RANK: number;
        LOCATION_NAME_WEIGHT: number;
        PRIMARY_INDEX_FUZZYNESS: number;
        PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
        PRIMARY_INDEX_WEIGHT: number;
        RATIO_OF_FUZZY_TO_EXACT: number;
        RATIO_OF_PREFIX_TO_EXACT: number;
        SECONDARY_INDEX_WEIGHT: number;
    };
    emitAnalyticsEvents?: boolean;
    jsonIndex?: string;
    searchDescriptions?: boolean;
    searchDescriptionsInCategories?: boolean;
    searchTags?: boolean;
    searchTagsInCategories?: boolean;
    stopWords?: string[];
    useLocationRank?: boolean;
}

A OfflineSearch is an offline search module

Type declaration

  • constants: {
        CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
        CATEGORY_LOCATION_NAME_WEIGHT: number;
        CATEGORY_LOCATION_TAGS_WEIGHT: number;
        CATEGORY_NAME_WEIGHT: number;
        LOCATION_DEFAULT_RANK: number;
        LOCATION_NAME_WEIGHT: number;
        PRIMARY_INDEX_FUZZYNESS: number;
        PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
        PRIMARY_INDEX_WEIGHT: number;
        RATIO_OF_FUZZY_TO_EXACT: number;
        RATIO_OF_PREFIX_TO_EXACT: number;
        SECONDARY_INDEX_WEIGHT: number;
    }

    Fine tune search constants

    • CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number

      Multiplier for category locations' descriptions

      Default

      0.0005
      
    • CATEGORY_LOCATION_NAME_WEIGHT: number

      Multiplier for category locations' names

      Default

      0.01
      
    • CATEGORY_LOCATION_TAGS_WEIGHT: number

      Multiplier for category locations' tags

      Default

      0.0005
      
    • CATEGORY_NAME_WEIGHT: number

      Multiplier for category names

      Default

      0.5
      
    • LOCATION_DEFAULT_RANK: number

      Default rank when one isn't available in the data, default = 1

      Default

      1
      
    • LOCATION_NAME_WEIGHT: number

      Multiplier for location names

      Default

      1
      
    • PRIMARY_INDEX_FUZZYNESS: number

      Fuzziness index for location names and tags

      Default

      0.09
      
    • PRIMARY_INDEX_TAGS_NAME_WEIGHT: number

      Multiplier for location tags

      Default

      0.05
      
    • PRIMARY_INDEX_WEIGHT: number

      Multiplier for location names (1 by default)

      Default

      1
      
    • RATIO_OF_FUZZY_TO_EXACT: number

      Ratio of Fuzzy Searches of Location names and tags relative to exact

      Default

      0.01
      
    • RATIO_OF_PREFIX_TO_EXACT: number

      Ratio of Prefix Searches of Location names and tags relative to exact

      Default

      0.2
      
    • SECONDARY_INDEX_WEIGHT: number

      Multiplier for descriptions

      Default

      0.025
      
  • Optional emitAnalyticsEvents?: boolean

    Emit Analytics events when doing search

    Default

    true when running in production
    
  • Optional jsonIndex?: string

    Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON())

  • Optional searchDescriptions?: boolean

    Index location descriptions - typically better to use either tags or descriptions, depending on what's available

    Default

    true
    
  • Optional searchDescriptionsInCategories?: boolean

    Also index all tags for every location in every category (caution: this may slow down indexing and search)

    Default

    false
    
  • Optional searchTags?: boolean

    Index location tags - typically better to use either tags or descriptions, depending on what's available

    Default

    true
    
  • Optional searchTagsInCategories?: boolean

    Also index all tags for every location in every category (caution: this may slow down indexing and search)

    Default

    false
    
  • Optional stopWords?: string[]

    Array of stopwords to ignore when searching, default: english stopwords

  • Optional useLocationRank?: boolean

    Use the location polygons' rank in weighing results