Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>how about using a key-value storage map and fulltext search.</p> <ul> <li>key for location string </li> <li>value for location_level and lat&amp;lon data.</li> <li>search by: <ul> <li>split user input string to single locations words (not only by comma)</li> <li>search each words in map</li> <li>return the lat&amp;lon of smallest location level</li> </ul></li> </ul> <p>python.dict,memcached,mongodb .... will meet ur need.</p> <ul> <li>if u have too many location words, split location_level as a new map, two searches will speed up </li> <li>forget location levels, traet as fulltext search</li> <li>huge data? hash key to short string or numbers</li> </ul> <p><strong>some questiongs to consider:</strong></p> <ul> <li>how to store the data in database</li> <li>how to init your searching tree from data, if any</li> <li>how to extend/edit searching tree in runtime</li> <li>fault-tolerant for input/storage</li> <li>storage space > speed? or speed > storage?</li> </ul> <p>so, more <strong>usable test case</strong> for user input</p> <blockquote> <pre><code>101 C, Time Square, New York, US 101 C, Pearl street, New York, US 101 C, Time Square, SomeCity, Mars 101 C 101 C, US 101 C, New York, US 101 C, New York, Time Square, US North Door, 101 C, Time Square, New York, US South Door, 101 C, Time Square, New York, US </code></pre> </blockquote> <p><strong>for the situation</strong>:</p> <ul> <li>fast-speed with huge-data; </li> <li>full-fault-tolerant; </li> <li>easy-adjust with storage and runtime</li> </ul> <p><strong>the best solution</strong>:(also complex-est)</p> <ul> <li>flat key-value map storage</li> <li>fulltext search <ul> <li>or hash key with B-tree search</li> </ul></li> </ul> <p>your program/website maybe able to run as fast as google.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload