sphinx

Use sphinx vs MySQL on no text search query

谁说我不能喝 提交于 2019-12-06 06:50:46
I have this doubt: Suppose I have a one big table with a relationship to to a smaller table of users. The idea is to search in that really big table for dates bigger than a given date and order by a score (big int, for example), and obtain related user info at the same time. The result of this query can change every 10 minutes or so. So, there is no text search, but I have a really big table. Should I use sphinx (or other search engine) or should I just use some MySQL indexes? If I use sphinx, it's sure that I can obtain really fast results; but maybe having the index refreshed, even with

How do you retrieve tags from JSGF grammars using sphinx?

风格不统一 提交于 2019-12-06 06:14:45
I have written an application in Java that utlizes the CloudGarden API to parse JSAPI grammars, return tags from the grammar rules and then process these tags accordingly. The issue with the CloudGarden API is its dependency on Windows. I need a cross-platform library that can perform the same task. I do not need speech synthesis nor do I need speech recognition. Essentially a string is passed to the program containing some transcribed speech. I need to parse this string against my grammar files to retrieve the action tags (the text between { } in a JSGF grammar rule). My program then uses the

Sphinx real time indexes config?

╄→尐↘猪︶ㄣ 提交于 2019-12-06 05:14:37
i am new to Sphinx i need sample code for real time indexex sphinx.config in linux sever? For near real time indexing you can use delta method : http://sphinxsearch.com/docs/1.10/delta-updates.html Edit: Index everything : indexer --rotate --config /home/myuser/sphinx.conf --all Index only delta : indexer --rotate --config /home/myuser/sphinx.conf delta Merge indexes : indexer --merge main delta --rotate 来源: https://stackoverflow.com/questions/5753334/sphinx-real-time-indexes-config

Thinking Sphinx not indexing newly added records

与世无争的帅哥 提交于 2019-12-06 04:54:46
问题 I am using sphinx to search on 2 models along with their associations. I am using delta indexing. Things work fine on my dev box in dev mode (Ubuntu). However, on staging box production env, when I create new records, I need to build the index again in order to make the newly created records searchable. Even weird is that when I create records using script/console, they seem to be getting indexed and are searchable. For the associations to work after update, I have an after_save method for

sphinx中文分词搜索coreseek windows下安装与基本使用简介

狂风中的少年 提交于 2019-12-06 04:06:59
这是半年前没有对外写的文章,现在拿出来分享下。可能会有一些不正确或不严谨的地方,某些语言可能比较轻浮,请见谅。 首先说明一下coreseek其实就是基于sphinx的中文分词版本,sphinx本身并没有提供中文分词功能,需要自行安装中文词库比较麻烦,coreseek提供了中文分词功能,提供了完整的官方中文使用文档,并且在使用上和官方的sphinx并没有差别。以 coreseek-4.1 版本为例 下载地址 http://www.coreseek.cn/news/14/54/ 帮助手册 http://www.coreseek.cn/products-install/#doc_cn 下面开始coreseek的安装 安装过程很简单,下载 coreseek-4.1-win32.zip ,解压至某一个文件夹,这里假设放在d:\coreseek下,双击打开test.cmd进行测试,会出来一串命令行的提示信息,留意提示信息,如果没有提示错误就算安装完成 安装后,先别急着怎么使用,首先要配置好文档,解缩包中有测试文件这里测试也略,教程尽量简单点(其实是我懒。。) 配置文件的位置可以放在任何地方,不过建议就放在d:\coreseek\bin\的目录好了,d:\coreseek\etc\目录下提供了好多配置的参考,我们把csft_mysql.conf复制至d:\coreseek\bin\下

Sphinx+PHP搜索服务

╄→尐↘猪︶ㄣ 提交于 2019-12-06 04:06:48
随着自己 电影网站 资源逐渐增多,增加电影资源搜索服务成为必然。直接操作数据库的搜索,IO口请求增多减低了搜索性能。之前项目中有sphinx的使用基础,加之支持中文检索服务,最后决定采用基于sphinx的Coreseek搜索服务。 下载安装步骤【本人采用 linux环境下 4.1版本,系统支持mysql和xml数据源】: coreseek下载地址 ,下载 coreseek-4.1-beta.tar.gz 包 解压gz包,tar zxvf coreseek-4.1-beta.tar.gz 编译安装 mmseg【中文分词包】 ./bootstrap ./configure --prefix=/usr/local/mmseg3 make && make install 编译安装 coreseek sh buildconf.sh #输出的warning信息可以忽略,如果出现error则需要解决 ./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql #with-mmseg

Sphinx 为Python自动生成文档

江枫思渺然 提交于 2019-12-06 02:10:51
sphinx 前言 Sphinx是一个可以用于Python的自动文档生成工具,可以自动的把docstring转换为文档,并支持多种输出格式包括html,latex,pdf等 开始 建一个存放文档的docs目录(跟项目路径同级),进入docs目录执行命令: sphinx-quickstart 填写相关信息 修改配置文件 conf.py 设置要处理的路径 import os import sys path_one = '..' # path_two为项目路径 path_two = '../project_name' sys.path.insert(0, os.path.abspath(path)) 设置文档主题 import sphinx_hand_theme html_theme = "sphinx_hand_theme" html_theme_path = [sphinx_hand_theme.get_html_theme_path()] 参考conf.py # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the

Escaping special characters in SphinxSE

给你一囗甜甜゛ 提交于 2019-12-05 13:26:14
Im using sphinx storage engine implementation for searching on my site, which works fairly well, however when a search includes characters such as & and @, the search fails with the following error: There was a problem processing the query on the foreign data source. Data source error: search query already specified and php throws this error: Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/path/to/file.php on line 100 Im escaping the user's input with mysql_real_escape_string Whats interesting is if I copy the query and run it in phpmyadmin directly, I get no

Sphinx returning bad search results

主宰稳场 提交于 2019-12-05 10:02:00
I am using Sphinx with the Thinking Sphinx plugin. I have indexed a model called Venue with the following code (and the rake thinking_sphinx:index command) define_index do indexes :name indexes city indexes zip end I obtain the results in my controller with this code: @venues = Venue.search params[:search] and I render them as json. The problem I have is that when I hit this URL: http://localhost:3000/venue/list?search=Baltimo I get nothing. But when I hit this URL: http://localhost:3000/venue/list?search=Baltimor I get all Venues located in the city of Baltimore. For some reason that one

Coreseek 4.1 win32设置

早过忘川 提交于 2019-12-05 08:10:54
mysql自带有fulltext索引,但是只限于英文字符,如果我们要对含有中文的大文本进行全文模糊索引,自带的 concat()like。。 是满足不了我们的速度需求的, 特别是当我们拥有大量数据,同时需要进行全文模糊索引的时候,如果只是使用like ,10W条的数据搜索时间就有15S!这是绝对不能容忍的,所以这个时侯就可以考虑使用 coreseek, Coreseek 是一款基于Sphinx的开源检索引擎,支持Tb级的全文数据索引,专门为中文用户提供免费开源的中文全文检索系统.具体软件可以到http://www.coreseek.cn/下载,本次主要是记录一下coreseek的简单设置。 一:下载 首先下载coreseek-4.1 win32版本的解压包,解压到随便一个盘符的目录下面 二:修改配置文件 在 X:\....\coreseek-4.1-win32\etc 文件夹下面是一些数据源的配置文件参考信息,此次在这里只说配置mysql数据源的。 首先复制一份 csft_mysql.conf 并重命名为(随意).conf 这里命名为 mysql.conf做参考. 打开mysql.conf , 在源定义里配置源的位置和类型 source mysql { type = mysql sql_host = localhost sql_user = root sql_pass = sql