Giter VIP home page Giter VIP logo

searchserver's Introduction

基于faiss的检索服务

1 概述

一个基于 faiss 的每日构建索引的检索服务

主要功能包括:

  • 添加向量至索引结构
  • 检索向量
  • topK Search
  • Approximate Nearest Neighbor Search
  • 按日期检索
  • 删除指定id向量或范围内向量
  • 重新配置
目录 说明
cmake cmake脚本文件
docs 项目相关文档
scripts 项目相关的脚本
src 项目源码(按模块组织)
test 项目测试使用的脚本

2 使用

2.1 安装依赖

# sudo apt-get install libopenblas-dev
# clone project
$ git clone https://github.com/FlYWMe/SearchServer.git
$ cd SearchServer

2.2 编译运行

# require cmake3
$ mkdir build
$ cd build
$ cmake ..
$ make -j"$(nproc)"

# run
$ ./bin/queryServer

# unit test
$ ./bin/FaissCPUSearch  # CPU flat暴力搜索采用最大堆实现
$ ./bin/FaissGPUSearch  # GPU flat warpSlect
$ ./bin/HNSWSearch
$ ./bin/sift1M  # datasets:http://corpus-texmex.irisa.fr/ sift1M GPU flat recall @1:99.19% @10:1 @100:1

# function test
$ ./bin/FaissLoadTest
$ ./bin/testRemove
$ ./bin/testSearchRange

PS: 编译要求gcc版本4.9以上,当配置文件不存在时(首次运行),会使用默认的配置参数,并在当前目录下自动生成配置文件config.json

2.3 版本发布

  • 修改版本号:修改最外层CMakeLists.txt文件中的VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH值为相应版本号
  • 合并分支:发起PR将当前分支合并到develop分支,测试通过后合并develop到master分支。
  • 添加标签:以相应的版本号新建标签。

PS:版本号命名规则

3 文档

3.1 项目文档

# 生成文档位于build/documents
$ make doc
  1. 代码规范
  2. API说明
  3. 配置说明

4 依赖项目

searchserver's People

Contributors

flywme avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.