• This repository has been archived on 26/Apr/2021
  • Stars
    star
    141
  • Rank 258,495 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[Deactived] search engine for v2ex

ninja-search

wiki

require:

python package

sudo pip install -r requirements.txt

elasticsearch 配置

  • 安装 ik 分词

  • 在 esroot /config /elasticsearch.yml 添加以下内容:

      #: 启用 ES 动态脚本,以提供综合排序
      script.disable_dynamic: false
    

爬取数据

索引

  • ElasticSearch Scheme Mapping

      sh ninja-search/deploy/mapping_ik.sh
    
  • 手动创建 Mongo 索引

      db.reply.createIndex({topic_id:1})
    
  • 索引数据

      deploy/mongo2es.py 
    
  • 将线上索引指向新的索引

      sh deploy/alias_v2_ik.sh
    

Run

sudo python index.py