Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

FlYWMe/SearchServer

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于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 依赖项目

About

一个基于 faiss 的检索服务.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.