Re: random sorting broken (was Re: Re[2]: php vs WebCatalog)

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27160
interpreted = N
texte = > >[Search >db=Greetings.db&negreetingdata=nada&greetingsort=1&greetingsdir=ra&max=1] >> [FoundItems][interpret][greeting][/interpret][/FoundItems][/Search] >> >>where the Greeting.db has only one field (named greeting) with >>records like- >>hello [username]...¬ >>(no record's field is equal to nada) >> >>But I find that I can force reload the page repeatedly (like 100 >>times over 5 different >>days) and only get one of >>2 greetings returned out of 12 possible. I NEVER get the other >>records returned - EVER! >>(not in weeks of testing.) >>That seems much more broken than simply not very random to me. >>You guys think my code >>is done correctly? How can I improve it while still using the >>random function? > >I put together a quick test page and database identical to yours. >The only difference is that I added the ALLHIT=1 parameter to the >search. Although this isn't really necessary in this instance, in >general, you should add it to searches like this. Remember, sorting >only happens among results with the SAME hitcount (the hitcount is >what is use to determine the automatic best result ranking for a >given search). > >You can hit the test page and see the results for yourself at: > >http://search.smithmicro.com/random.tpl > >Note that the page does 1000 searches so it may take a few seconds to come up. > >John. > >--------------------------------- > John A. HillThe results:talk:123 list:113 result:114 webcatalog:117 from:119 favorite:133 there:86 hello:48 my:65 the:82Note that the difference between the lowest and highest hit is over 2:1. If you run this same test up to 100,000 or more, there are still some entries that get selected significantly less often than others.My background in math tells me that all random number generators should produce an even distribution over the full range of possible values after x executions, provided that x is sufficient large.The random sort algorithm in Webcat appears to favor certain values over others, which causes problems in certain applications that really need to see all possible values on a regular basis.Comments?-Dale -- -- Dale LaFountain Vice President of Information Technology, WebMaster Dark Horse Comics, Inc. mailto:dalel@darkhorse.com Phone: 503-652-8815 x324 http://www.darkhorse.com/------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
> >[Search >db=Greetings.db&negreetingdata=nada&greetingsort=1&greetingsdir=ra&max=1] >> [founditems][interpret][greeting][/interpret][/FoundItems][/Search] >> >>where the Greeting.db has only one field (named greeting) with >>records like- >>hello [username]...¬ >>(no record's field is equal to nada) >> >>But I find that I can force reload the page repeatedly (like 100 >>times over 5 different >>days) and only get one of >>2 greetings returned out of 12 possible. I NEVER get the other >>records returned - EVER! >>(not in weeks of testing.) >>That seems much more broken than simply not very random to me. >>You guys think my code >>is done correctly? How can I improve it while still using the >>random function? > >I put together a quick test page and database identical to yours. >The only difference is that I added the ALLHIT=1 parameter to the >search. Although this isn't really necessary in this instance, in >general, you should add it to searches like this. Remember, sorting >only happens among results with the SAME hitcount (the hitcount is >what is use to determine the automatic best result ranking for a >given search). > >You can hit the test page and see the results for yourself at: > >http://search.smithmicro.com/random.tpl > >Note that the page does 1000 searches so it may take a few seconds to come up. > >John. > >--------------------------------- > John A. HillThe results:talk:123 list:113 result:114 webcatalog:117 from:119 favorite:133 there:86 hello:48 my:65 the:82Note that the difference between the lowest and highest hit is over 2:1. If you run this same test up to 100,000 or more, there are still some entries that get selected significantly less often than others.My background in math tells me that all random number generators should produce an even distribution over the full range of possible values after x executions, provided that x is sufficient large.The random sort algorithm in Webcat appears to favor certain values over others, which causes problems in certain applications that really need to see all possible values on a regular basis.Comments?-Dale -- -- Dale LaFountain Vice President of Information Technology, WebMaster Dark Horse Comics, Inc. mailto:dalel@darkhorse.com Phone: 503-652-8815 x324 http://www.darkhorse.com/------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Dale LaFountain

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:

Re:Copyright ? (1997) [WebDNA] [BULK] ampps.com - let webdna be included (2012) WebCatalog and barcodes (2000) lookups (2000) WebCatalog NT beta 18 now available (1997) Help! (1996) WebCatalog2 Feature Feedback (1996) [ListFiles] & [loop] (1998) Convertchars Problem (2004) [WebDNA] Limts? -and- Hot Merge (2009) FlushDatabase Suggestion (1998) Preventing Merchant Settling ? (1997) Odd Cart Behavior (1997) ShowNext truncating passed variable?? (1997) WebCat2b15MacPlugin - [protect] (1997) Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997) RE: Re:Signal Raised (1997) [ShowCart] and GET vs. POST (1997) CC: (1998) Express Lane (2000)