网站建设建站_网站设计收费_苏州网站制作_网站定制 2.7 运行环境">

哈尔滨网站制作

大型网站建设价格、海口做网站、永久使用、不限域名、武汉 网站制作

制作网站开发公司?

网站建设建站_网站设计收费_苏州网站制作_网站定制

struct more_Inverted_zipper{uint64_t docid;vector<string> words;int weight;more_Inverted_zipper():docid(0),weight(0){};};void Search(string &keyword,string *json_word){vector<string> result;project_tool::jiebatool::CutString(keyword,&result);//vector<project_index::Inverted_zipper> Inverted_listmax;vector<more_Inverted_zipper> Inverted_listmax;unordered_map<uint64_t,more_Inverted_zipper> part_map;for(string s :result){   boost::to_lower(s);vector<project_index::Inverted_zipper> *Inverted_list = Index->Getinverted_index(s);if(nullptr == Inverted_list){continue;}//Inverted_listmax.insert(Inverted_listmax.end(),Inverted_list->begin(),Inverted_list->end());//重复插入的问题for(auto &it:*Inverted_list){auto &temp = part_map[it.docid];temp.docid = it.docid;temp.weight += it.weight;temp.words.push_back(move(it.keyword));}}for(const auto &it : part_map){Inverted_listmax.push_back(move(it.second));}sort(Inverted_listmax.begin(), Inverted_listmax.end(),[](const more_Inverted_zipper &e1, const more_Inverted_zipper &e2){return e1.weight > e2.weight;});Json::Value root;for(auto &it : Inverted_listmax){project_index::Format * doc  = Index->GetFront_index(it.docid);if(nullptr == doc){continue;}Json::Value temp;temp["title"] = doc->title;temp["summary"] = Getsummary(doc->content,it.words[0]);//debugtemp["url"] = doc->url;//debugtemp["weight"] = it.weight;temp["docid"] = (int)it.docid;root.append(temp);}Json::FastWriter writer;*json_word = writer.write(root);}
				   莱芜网站建设福田网站设计保定网站建设建设网站建设义乌网站建设社交电商app开发江苏网站建设滁州网站建设小企业网页制作制作网站公司软件app开发公司洛阳网站建设嘉兴网站建设苏州公司网站建设集团网站设计网页开发贸易网站建设门户网站制作网站建设论坛影视网站建设沈阳网站制作公司网站制作报价网站建设难不难重庆网站建设选圣矢网站开发建设做企业网站大型门户网站建设上海网站制作公司东莞微信小程序开发服装网站建设蚌埠网站制作公司
                
                

猜你喜欢