function searchAmazon($keywords){
..... //preamble code
$apaiIO = new ApaiIO($conf);
$search = new Search();
... //setting and filters
$search->setKeywords($keywords);
... //retrieve it and put it in an array or similar
... //blabla return
}
$products1=searchAmazon($keyword1);
$products2=searchAmazon($keyword2);
$products=merge($products1,$products2);//use some merge algorithm of your choice
1条答案
按热度按时间dhxwm5r41#
查询是交集,而不是并集
它不检索“Hadoop和Java中的任何一个”,而是检索带有“Hadoop和Java两者”的项目,可能没有
我通过合并2个查询的结果解决了类似的情况: