Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to format search autocompletion part lists?
    primarykey
    data
    text
    <p>I'm currently working on an AppEngine project, and I'd like to implement autocompletion of search terms. The <em>items</em> that can be searched for are reasonably unambiguous and short, so I was thinking of implementing it by giving each <em>item</em> a list of incomplete typings. So <code>foobar</code> would get a list like <code>[f, fo, foo, foob, fooba, foobar]</code>. The user's text in the searchbox is then compared to this list, and positive matches are suggested.</p> <p>There are a couple of possible optimizations in this list that I was thinking of:</p> <ul> <li>Removing spaces punctuation from search terms. <code>Foo. Bar</code> to <code>FooBar</code>.</li> <li>Removing capital letters</li> <li>Removing leading particles like "the", "a", "an". <code>The Guy</code> would be <code>guy</code>, and indexed as <code>[g, gu, guy]</code>.</li> <li>Only adding substring longer than 2 or 3 to the indexing list. So <code>The Guy</code> would be indexed as <code>[gu, guy]</code>. I thought that suggestions that only match the first letter would not be so relevant.</li> </ul> <p>The users search term would also be formatted in this way, after which the DB is searched. Upon suggesting a search term, the particles, punctuation, and capital letters would be added according to the suggested object's full name. So searching for "the" would give no suggestions, but searching for "The Gu.." or "gu" would suggest "The Guy".</p> <p>Is this a good idea? Mainly: would this formatting help, or only cause trouble?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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