Re: Num Sort Descending

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 56083
interpreted = N
texte = I think "wrong" and "right" are oversimplifications... The first method, where each field is tested individually, should work fine. It's probably a little slower than using a group, but it does the same thing and actually has an advantage: IF you are using WebDNA's default sorting, then testing each field individually may give you better "best match" results. From my testing a while back (it should be in the archives somewhere), I determined that WebDNA's rankings are based on the number of search terms that got a match, and a match on a group of fields only counts as one hit. So, if you search multiple fields individually, then if you get a match on three different fields then the record will be ranked higher than a record that only matched on one or two fields. Of course, if you are overriding the default sorting with "allhit=1" or "rank=off", I'd certainly recommend the group field method, for simplicity and maintainability of the code as well as minor performance improvement. The one thing I would consider "wrong" in this example, though, is the common error of not wrapping user input in a [url] context. If the user enters an ampersand, the search will break. - brian On Feb 12, 2004, at 7:29 AM, John Peacock wrote: > This is wrong: > > &wsclient_namedata=[txtKeyword]&wsclient_repdata=[txtKeyword]&wsclient_ > phonedata=[txtKeyword]&wsclient_emaildata=[txtKeyword]&wsclient_numdata > =[txtKeyword] > > This is right: > > &GROUP1field=CLIENT_NAME+CLIENT_REP+CLIENT_PHONE+CLIENT_EMAIL+CLIENT_NU > M&wsGROUP1data=[txtKeyword] > > HTH > > John > > p.s. I changed the capitalization for a reason; think about it... > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Num Sort Descending ( "Dan Strong" 2004)
  2. Re: Num Sort Descending ( Gary Krockover 2004)
  3. Re: Num Sort Descending ( Brian Fries 2004)
  4. Re: Num Sort Descending ( Brian Fries 2004)
  5. Re: Num Sort Descending ( "Dan Strong" 2004)
  6. Re: Num Sort Descending ( Gary Krockover 2004)
  7. Re: Num Sort Descending ( Glenn Busbin 2004)
  8. Re: Num Sort Descending ( Donovan Brooke 2004)
  9. Re: Num Sort Descending ( Gary Krockover 2004)
  10. Re: Num Sort Descending ( John Peacock 2004)
  11. Re: Num Sort Descending ( Gary Krockover 2004)
  12. Re: Num Sort Descending (OT) ( "Dan Strong" 2004)
  13. Re: Num Sort Descending (OT) ( Matthew A Perosi 2004)
  14. Re: Num Sort Descending (OT) ( Joe D'Andrea 2004)
  15. Re: Num Sort Descending (OT) ( Matthew A Perosi 2004)
  16. Was: Num Sort Descending (OT) Now: List Ediquette ( Donovan Brooke 2004)
  17. Re: Num Sort Descending (OT) ( Justin Carroll 2004)
  18. Re: Num Sort Descending (OT) ( Joe D'Andrea 2004)
  19. Re: Num Sort Descending (OT) ( Justin Carroll 2004)
  20. Re: Num Sort Descending ( Justin Carroll 2004)
  21. Re: Num Sort Descending ( John Peacock 2004)
  22. Re: Num Sort Descending ( John Peacock 2004)
  23. Re: Num Sort Descending ( Joe D'Andrea 2004)
  24. Re: Num Sort Descending ( Justin Carroll 2004)
  25. Num Sort Descending ( Justin Carroll 2004)
I think "wrong" and "right" are oversimplifications... The first method, where each field is tested individually, should work fine. It's probably a little slower than using a group, but it does the same thing and actually has an advantage: IF you are using WebDNA's default sorting, then testing each field individually may give you better "best match" results. From my testing a while back (it should be in the archives somewhere), I determined that WebDNA's rankings are based on the number of search terms that got a match, and a match on a group of fields only counts as one hit. So, if you search multiple fields individually, then if you get a match on three different fields then the record will be ranked higher than a record that only matched on one or two fields. Of course, if you are overriding the default sorting with "allhit=1" or "rank=off", I'd certainly recommend the group field method, for simplicity and maintainability of the code as well as minor performance improvement. The one thing I would consider "wrong" in this example, though, is the common error of not wrapping user input in a [url] context. If the user enters an ampersand, the search will break. - brian On Feb 12, 2004, at 7:29 AM, John Peacock wrote: > This is wrong: > > &wsclient_namedata=[txtKeyword]&wsclient_repdata=[txtKeyword]&wsclient_ > phonedata=[txtKeyword]&wsclient_emaildata=[txtKeyword]&wsclient_numdata > =[txtKeyword] > > This is right: > > &GROUP1field=CLIENT_NAME+CLIENT_REP+CLIENT_PHONE+CLIENT_EMAIL+CLIENT_NU > M&wsGROUP1data=[txtKeyword] > > HTH > > John > > p.s. I changed the capitalization for a reason; think about it... > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Serious bug writing to a database ... (2002) RE: Signal Raised (1997) Setting up shop (1997) Mac OS X Server, Apache etc etc (1999) WebCat .pdf file is formatted incorrectly... (2000) Num Found by category (2000) carriage returns in data (1997) last word listed (2000) Nested tags count question (1997) WC1.6 to WC2 date formatting (1997) Authenticating users without dialog box (1997) WebCatalog for guestbook ? (1997) WebCommerce: Folder organization ? (1997) can WC render sites out? (1997) [GROUPS] followup (1997) [LOOKUP] (1997) Hiding HTML and page breaks (1997) sort problems....bug or brain fart? (1997) Problem with listfields with WC 4.0.2rc2/Webstar 4.4 (2001) Protect (1997)