LavishNav:Region Name Search

From Lavish Software Wiki
Jump to: navigation, search

LavishNav Region Name Search

Unique Names

LavishNav provides a flexible region naming and search scheme, based around the idea that some names will be absolutely unique. For example, no two countries have the same name on Earth, so United States of America would be unique, as would Canada, Mexico, and so on. Because these names are unique, they will be immediately recognized as pointing to that region. These countries could be said to reside within other regions, such as North America and Earth. So let's pretend we have this little region tree, which consists only of unique names:

  • Earth
    • Africa
    • Antarctica
    • Asia
    • Australia
    • Europe
      • France
      • Germany
    • North America
      • Canada
      • Mexico
      • United States of America
    • South America

For demonstration purposes, all unique names in example trees have been bolded

Fully-Qualified Names

A LavishNav Fully-Qualified Name for any region is its name, and if it has a parent, followed by a period and its parent's FQN. For example, Earth is Earth, but USA is United States of America.North America.Earth. A search name can end at any unique name, but more unique names can be used to verify ancestry.

Descendent Searching

From the first unique name, or if no names in the search are unique, a multiple-level descendent search is performed -- this should be avoided if possible; the more unique names, the better. For example, further divisions of a country can be made. For the USA, this might include state, county, city. Here's a little tree that may be a sub-tree of the above tree:

  • United States of America
    • Massachusetts
      • Boston
      • Lowell
    • Michigan
      • Kent County
        • Ada
        • Lowell
        • Grand Rapids
        • Grandville
    • New York
      • New York County
        • New York City
        • Manhattan

Name Collisions

This tree purposefully shows a name collision to be used more in this article, as well as demonstrates that regions do not necessarily have to follow a strict scheme (notice that Boston, MA and Lowell, MA are not divided into counties). Consider the search Lowell.United States of America. United States of America is unique, and immediately resolves to the proper region. Lowell, however, is not unique, so a true search must be performed, and will match any region named Lowell that is a descendant of United States of America. Here's a problem: there are two regions named Lowell. The system does not attempt to determine which was meant, as both are perfectly accurate for the given search! To select a specific Lowell accurately, the closest unique parent should be used, such as Kent County, or Massachusetts -- or at least a unique parent that isn't likely to contain such a name collision (Michigan is sufficient for Lowell, MI).

Avoiding Name Collisions

Let's move a step further. Say we have an address 123 Elm Street SE. This address might exist in multiple cities, but not likely to exist twice in the same city. So it's certainly not a unique name, and it's not necessarily going to be in a unique city name. So let's say we have this address in both Lowell, MI and nearby Ada, MI.

  • Kent County
    • Ada
      • 123 Elm Street SE
    • Lowell
      • 123 Elm Street SE

Search Context

123 Elm Street SE.Kent County may produce either of the above addresses, and 123 Elm Street SE.Ada may be inefficient because it contains no unique name for context (note that some searches begin with the context of a region, in which case the search for 123 Elm Street SE.Ada would begin within that context). Therefore, a full search for that address may be 123 Elm Street SE.Ada.Kent County, or for extra completeness could equally be 123 Elm Street SE.Ada.Kent County.Michigan, but could also be found with 123 Elm Street SE.Ada.Michigan. Phew! With that last example it should be apparent that extra regions can be left out of the search. However, if extra regions are in the search, the desired region cannot be identified.

See Also