sphinx

how much more performant is sphinx than MySQL default fulltext search?

旧巷老猫 提交于 2019-12-08 02:47:51
问题 MySQL's default fulltext search sucks when the data volume is big. So I'm counting on sphinx to get rid of the trouble. Is there a benchmark data available that compares these two kinds of searches? 回答1: This claims 50-100x, up to 1000x, while this has even more drastic results. I've used both on dbs, and in my experience, there really isn't a comparison; you just can't use FULLTEXT for a large database, while sphinx is both fast and accurate. 来源: https://stackoverflow.com/questions/1046297

How do you retrieve tags from JSGF grammars using sphinx?

半世苍凉 提交于 2019-12-08 02:36:27
问题 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

Is there any hash function in PostgreSQL?

邮差的信 提交于 2019-12-08 00:27:53
问题 I am using Sphinx to index my database. The problem is I have to filter the result by a character varying field. So I have to find a way to convert character varying to sql_attr_uint . I know that CRC32 in mysql can do the trick. Is there a CRC32 or any replacement in PostgreSQL? 回答1: Maybe you can use decode(substring(md5('foo') for 8), 'hex') . This would get you bytea of first 4 bytes of md5 hash of this string. You can convert it to integer using something like: create function bytea_to

Sphinx Filters - Can I have an 'OR' between filters attributes?

徘徊边缘 提交于 2019-12-07 23:49:16
问题 I'm using sphinx to list me some items from my database here. It's almost 100%, I just haven't figured out yet how to create an OR between two different filters. For example: My Object in the database has a starting and an ending date, I can filter(starting_date, x, y) and filter(ending_date,x,y) , but both filters will have to return true to bring me the object, how can I say to sphinx filter this attribute, or that one? 回答1: Sphinx uses | for or as in "black" OR "white" would be "black" |

Sphinx real time indexes config?

荒凉一梦 提交于 2019-12-07 22:59:56
问题 i am new to Sphinx i need sample code for real time indexex sphinx.config in linux sever? 回答1: 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

Use sphinx vs MySQL on no text search query

流过昼夜 提交于 2019-12-07 22:18:35
问题 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

How to escape special characters in sphinxQL fulltext search?

旧巷老猫 提交于 2019-12-07 12:00:30
in the sphinx changelog it says for 0.9.8: "added query escaping support to query language, and EscapeString() API call" can i assume, that there should be support for escaping special sphinx characters (@, !, -, ...) for sphinxQL, too? if so, maybe someone could point me to an example on this. i'm unable to find anything about it in the documentation or elsewhere on the net. how do you do fulltext search (using spinxQL), if the search-phrase contains one of the special characters? i don't like the idea very much to "mask" them during indexing. thanks! There are corresponding functions

Escaping special characters in SphinxSE

本秂侑毒 提交于 2019-12-07 09:28:19
问题 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

Sphinx: WARNING: Attribute count is 0: switching to none docinfo

只愿长相守 提交于 2019-12-07 03:20:53
问题 I'm new to Sphinx and I can't seem to figure out what this warning is referring to or how to fix it. A google search didn't provide much information so I'm hoping a database guru here knows how to fix this. Thanks! 回答1: There is nothing to be scared. The message says that the mode of additional attributes storing, which is set in the config file, will be turned off, due to absence of these attributes. docinfo is the complete set of per-document attribute values. Read more about this here http

coreseek 基与Sphinx 的全文索引

做~自己de王妃 提交于 2019-12-06 17:01:33
假设有两张那个表,分别为articles,article_photos两张表。搜索的时候,要匹配articles.title、articles.intro、article_photos.caption这三个字段。 PHP页面 header("content-type:text/html;charset=utf8"); include './sphinxapi.php'; //包含sphinxapi类 $sphinx = new SphinxClient(); //实例化 $sphinx->SetServer('localhost', 9312);//链接 $res = $sphinx->Query("暴动", "*");//查询的字段第二参数是你配置文件里面写得规则这里是*就会匹配所有规则 echo "<pre>"; print_r($res['matches']); coreseek.conf 内容配置如下 #源定义 #mysql类只实现连接数据库 source mysql { type = mysql sql_host = localhost sql_user = root sql_pass = sql_db = nextmgz_archive sql_port = 3306 sql_query_pre = SET NAMES utf8 # 命令行查询时,设置正确的字符集