摘要 |
The invention provides a method for searching objects in a database by means of an index data structure which associates object attribute values to collections of spatial elements—such as tiles of a quadtree or cuboids of an octtree—defined to partition a space, herein a predefined number of spatial elements being combinable to a next-level spatial element. The method comprising: searching the index data structure for a first input search pattern and, if the first input search pattern is associated to a first collection of spatial elements through the index data structure, including all spatial elements from the first collection into a first candidate set of spatial elements, wherein, if the number of spatial elements in the first candidate set exceeds a predetermined maximum, some or all of the spatial elements are combined to a reduced number of next-level spatial elements; searching the index data structure for a second input search pattern and, if the second input search pattern is associated to a second collection of spatial elements through the index data structure, including all spatial elements from the second collection into a second candidate set of spatial elements, wherein, if the number of spatial elements in the second candidate set exceeds a predetermined maximum, some or all of the spatial elements are combined to a reduced number of next-level spatial elements; forming, from of the first candidate set and the second candidate set, a combined candidate set of spatial elements; and searching, in the combined candidate set of spatial elements, for objects that match the first input search pattern and the input second search pattern to obtain a set of result objects. |