| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Word2vec 个性化搜索实现 +Scrapy2.3.0(爬取数据) + ElasticSearch7.9.1(存储数据并提供对外Restful API) + Django3.1.1 搜索
本仓库为爬虫端数据入库ElasticSearch代码,实现整个搜索需要结合Django网站端项目 https://github.com/mtianyan/mtianyanSearch
word2vec 模型训练全过程请查看项目Word2VecModel 中README word2vec 使用,影响ElasticSearch打分,请查看mtianyanSearch中相关代码
核心打分代码:
"source": "double final_score=_score;int count=0;int total = params.title_keyword.size();while(count < total) { String upper_score_title = params.title_keyword[count]; if(doc['title_keyword'].value.contains(upper_score_title)){final_score = final_score+_score;}count++;}return final_score;"
标题每包含一个相关词,分数加倍
git clone https://github.com/mtianyan/FunpySpiderSearchEngine # 修改config_template中配置信息后重命名为config.py # 执行 sites/zhihu/es_zhihu.py cd FunpySpiderSearchEngine pip install -r requirements.txt scrapy crawl zhihu
docker network create search-spider git clone https://github.com/mtianyan/mtianyanSearch.git cd mtianyanSearch docker-compose up -d git clone https://github.com/mtianyan/FunpySpiderSearchEngine cd FunpySpiderSearchEngine docker-compose up -d
访问127.0.0.1:8080
如果我的项目代码对你有帮助,请我吃包辣条吧!
| Back | FazBrowse Home | New Git URL |