Enterprise application-level search engine lucene-solr test report

WBOY
Release: 2016-07-25 08:51:08
Original
930 people have browsed it
Test solr source code
  1. set_time_limit(0);
  2. $a[1] = array("Sent","Pizza","No matter","Whether","World of Warcraft","But" ,"test","is","speechless","mi oh","mingqiang","talker's life has passed","match","mingque","unify Assam","resistant "Material", "Gong Bin", "Father Time is a sharp sword", "If you are not depressed today, it will be your failure to succeed", "Silence is the best ending", "Thousands of people listen quietly", " "I", "Yes", "Chinese", "Kill the little Japanese", "Yes", "Do you understand", "Or you and I have no choice", "You are still here tonight");
  3. $a[2 ] = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23, 24,25,26,28,29,30);
  4. $a[3] = array('a','b','c','d','e','f','g', 'h','i','j','k','l','o','p','q','r','s','t','u','v ','w','w','x','y','z','m','n','ppppppdfsfdaspsdapp','sadasjhsddfhfds','hsecfdf','sdasw');
  5. $a [4] = array('あ','い','う','え','お','か','き','く','け','こ','さ', 'し','す','せ','そ','た','ち','つ','て','と','な','に','ぬ','ね','の','は','ひ','ふ','へ','ほ','ま','み','む','め','も','や', 'ゆ','よ','ら','り','る','れ','ろ','わ','をん','卐');
  6. $b[1] =' What dsadsahu said about Huggins’s Ha Christmas, the real coquettish Ha Shi’s thickness? He killed Ha Jin’s general Saga and everyone was in class, and after the liberation, Sa Jin Phoenix was generous and saw Van der Sarfa. Van der Sar's delivery is good when it's generous';
  7. $b[2] ='sdh's technology is so cheap. Van der Sar's coffee database is as coquettish as China Eastern Airlines' actual score is. The algorithm client and the coquettish one who killed Van der Sar in the golden era fake mortgage speed and delivery switch top ten coquettish combination';
  8. $b[3] ='The big environment of Fei City can fly coquettishly, coquettishly deliver good goods, haha Haha Shanda mobile phone one Ada Ada defeat Sa's ah Su'e my Odessa defeat Sa Da u Everyone welcomes dizzy Sa Asad Haha The torment of fighting in the building must be Ka'a is the navigation key Assad's ah Dahe's Ah, the love of the mobile phone number is very big. According to the big data of the customer, I fight Satanism in Harbin. In other words, I go home to the golden yellow. In other words, the switches are tightly linked and everyone is fussy about getting married. The words and bows of Assad and Harbin Normal University are very good. Flying big tie knot hair plus master separation family situation good hair saying real house or situation i';
  9. $b[4] ='how many acceptable demonstration store space to see the magic blow is the engine real score BOE Master Kong’s coffee database is crazy. Federer’s accounting method. The big data card is the house price. The hair is short. The space is the engine. Brown. When is the wig? The bonus is sealed. Master Sutcliffe paid as little as possible. It seems that the weight loss is all in vain. He is going crazy. Looking back to the room, the developer's situation is said to be short hair in Hefei City. What happened after seeing it happened. It happened after seeing it. It happened after seeing it. It happened after seeing it. The and brown food expenses are seen with short hair interface';
  10. //$b5 ='The way to see the wind and the flying USD hair u shield flying when to concentrate on in other words data hobby is the master of Ha Hongjian The spell u East China Normal University in Hefei City is a sure way to open an account with customers. The interface lies and the delivery is still local. The customer is Dongfanghong. The speed of payment and delivery of high-quality goods is very fast. The third party is very fast. The leading bank that opened the account is Dongfanghong. It's Dongfanghong's clothes. East China Normal University's good-looking hair. It's floating point. It's empty after water and electricity bills. It's Dongfanghong. It's Dongfanghong. It's Dongfanghong's food expenses. East China Normal University's golden yellow color';
  11. /**
  12. $t1 = microtime(true);
  13. $s = "";
  14. for($i = 0; $i < 1000000; $i++)
  15. {
  16. $min = rand(1,4);
  17. $index = rand(2,18);
  18. if($i % 10 == 1)
  19. {
  20. $s .="";
  21. $cli = "curl http://192.168.10.30:8080/ solr/update?commit=true -H 'Content-Type: text/xml' --data-binary '{$s}'";
  22. system($cli);
  23. $s ="";
  24. echo 'succes';
  25. }
  26. else
  27. {
  28. $s .= "zmsd".$i."isdahiii".$a[$min][$index].$b[$min]."One million 5991";
  29. }
  30. }
  31. $t2 = microtime(true);
  32. $t = $t2 - $t1;
  33. echo $t;
  34. */
  35. for($i=0; $i < 10000; $i++)
  36. {
  37. $x = rand(1,4);
  38. $y = rand(1,20);
  39. $z = rand(1,20);
  40. $w = rand(1,14);
  41. $url='http://192.168.10.30:8080/solr/collection1/select?q=name:'.urlencode($a[$x][$y]).'+OR+name:'.urlencode($a[$x][$w]).'+OR+name:'.urlencode($a[$x][$z]).'+OR+name:'.urlencode($a[$x][$z+1]).'&wt=json&indent=true';
  42. $urld='http://192.168.10.30:8080/solr/collection1/select?q=name:'.$a[$x][$y].'+OR+name:'.$a[$x][$w].'+OR+name:'.$a[$x][$z].'+OR+name:'.$a[$x][$z+1].'&wt=json&indent=true';
  43. $ret = http_post($url);
  44. $aInfo = json_decode($ret, true);
  45. $iTime = $aInfo['responseHeader']['QTime'];
  46. $iRow = $aInfo['response']['numFound'];
  47. $msg = $i."t".'[query]:'.$urld."t".'[time]:'.$iTime."t"."[row]:".$iRow."n";
  48. error_log($msg,3,"/home/fanhy/test/solrtest.txt");
  49. }
  50. function http_post($url, $data="")
  51. {/*{{{*/
  52. $ch = curl_init();
  53. curl_setopt($ch, CURLOPT_URL, $url);
  54. curl_setopt($ch, CURLOPT_POST, true);
  55. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  56. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  57. curl_setopt($ch, CURLOPT_TIMEOUT, 120);
  58. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
  59. curl_setopt($ch, CURLOPT_NOSIGNAL, 1 );
  60. $res = curl_exec($ch);
  61. //var_dump($res);
  62. $errno = curl_errno($ch);
  63. $errmsg = curl_error($ch);
  64. curl_close($ch);
  65. return $res;
  66. }/*}}}*/
  67. ?>
复制代码


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template