Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/22/2012 in all areas

  1. You're probably expecting $config->urls->root to return a full URL (I'm guessing) in which case you need $pages->get('/')->httpUrl; See this thread for info:
    1 point
  2. Michael, I just replied to a PM from someone else about this, so it's quite a coincidence for the next message I read to be on the same topic. I'd already started an autocomplete Inputfield using jQuery UI some time ago, and just never got around to finishing it. Since it's come up again, perhaps now is a good time for me to finish it. If you are only dealing with ~1500 street names there won't be much if any noticeable performance hit from %= vs *=. Granted *= is using an index and %= isn't, but 1500 items is chump change to MySQL, especially with something short like street names. When you use *= or %= (as opposed to ~=), note that those are wildcard searches when used with single words. They will find all words matching or beginning with the specified term. Meaning a search for "start" will also match "started", "starts", and "starter" (as examples). Also take a look at the ^= and $= operators, which will match at the beginning or end of a string. We are pushing the limits of what a fulltext index will let us do, but you can get more wildcard type options using a MySQL LIKE query directly to have something like "st_rt" match "start" or "%start" match "restart". I've not found these to be useful in my own web development projects so haven't implemented them into PW operators. But we may bring more MySQL LIKE and REGEXP commands into PW selectors in the future. My feeling is that I don't really want to encourage people to use them because they aren't scalable, relying upon full non-indexed table scans. But when dealing with items at the scale we were talking about (1500) it doesn't matter much. I don't how to implement such a thing at present (with MySQL), but will keep an eye on such possibilities in the future. I believe that Google finds those 'did you mean' options by monitoring repeated search behavior at a large scale over time.
    1 point
×
×
  • Create New...