A method and system for generating a hybrid index for indexing objects
based on location and keyword attributes and performing location-based
searching is provided. A search system performs a location-based search
using a hybrid index that indexes both location and keyword attributes of
objects. The search system generates the hybrid index either using the
location attribute as the primary index or the keyword attribute as the
primary index. When the location attribute is the primary index, the
keyword attribute is the secondary index, and vice versa. To generate the
hybrid index, the search system identifies the values for the keyword and
location attributes of each object. The search system generates the
primary index to map each value of a first attribute to a secondary
index. The search system thus generates, for each value of the first
attribute, a secondary index to map values of a second attribute to
objects that have the associated values of the first and second
attributes. The search system then uses the hybrid index to perform
location-based searching.