sphinx

How does sphinx UTF-8 search work?

橙三吉。 提交于 2019-12-11 05:04:45
问题 In my database I have Unicode characters like 再也 encoded in UTF-8. When I use sphinx search, I am not able to find that particular word. I tried searching using the HTML encoded 再也 which did not work as well. The charset type in my sphinx.conf is: charset_type = utf-8 Any idea how to make sphinx search for UTF-8 characters? I'm clueless. 回答1: If you're dealing with Chinese full-text searching, you can try this: http://code.google.com/p/sphinx-for-chinese 来源: https://stackoverflow.com

Where clause has OR In Sphinx

痴心易碎 提交于 2019-12-11 04:43:33
问题 Is there a way to do this line in sphinx search where field_a = 'Value' or field_b = 'Value' I have tried so far $sphinx->where(field_A | field_B, '=', 'Value') But it's not working. Could someone help me to get over this? 回答1: Sphinx itself does not support 'OR' in the WHERE clause. But can do something like SELECT id, (attribute_a = 'Value' OR attribute_b = 'Value') AS test FROM index WHERE test = 1 It's a little convoluted, but does work. Also no idea what library you using to build the

How do I configure PostgreSQL or MySQL to set up a database with Sphinx?

筅森魡賤 提交于 2019-12-11 04:33:44
问题 I really need help installing Sphinx and getting it going. I'm on rails 3 and I'm following these set of directions: http://freelancing-god.github.com/ts/en/quickstart.html to install Sphinx. Thinking Sphinx was easy to install since it's a gem. However, the guide says I need to have both Sphinx and Thinking Sphinx installed to get started (Is this true?). I checked Ryan Bates' railscast for Thinking Sphinx and he only installed the plugin and got started immediately. Anyways, I installed

Sphinx ignores ranking, always sorts in the same order

人走茶凉 提交于 2019-12-11 04:21:25
问题 I have sphinx index on schools , and when I do a query I always receive the same results, in the same order. I've tried every imaginable combination of ranking, sorting, and matching, and always get the same sorting. A sample of the bad data I'm getting is below: "albany high" Albany Junior High School | Auckland, NZ | 2001 (shouldn't be first) Albany High School | Albany, NY | 2001 South Albany High School | Albany, OR | 2001 Albany High School | Albany, CA | 1001 (shouldn't be last) As you

Handling dates prior to 1970 in a repeatable way in MySQL and Python

为君一笑 提交于 2019-12-11 03:40:19
问题 In my MySQL database I have dates going back to the mid 1700s which I need to convert somehow to ints in a format similar to Unix time. The value of the int isn't important, so long as I can take a date from either my database or from user input and generate the same int. I need to use MySQL to generate the int on the database side, and python to transform the date from the user. Normally, the UNIX_TIMESTAMP function, would accomplish this in MySQL, but for dates before 1970, it always

Sphinx .net implementation

情到浓时终转凉″ 提交于 2019-12-11 02:00:41
问题 Is it possible to implementation Sphinx (full-text search) in .net - MSSQL Application. if so , any help how to implement the same, a small description will help a lot. 回答1: We're using SphinxConnector.NET: http://www.sphinxconnector.net/ 来源: https://stackoverflow.com/questions/1400121/sphinx-net-implementation

ElasticSearch: Full-Text Search made easy

杀马特。学长 韩版系。学妹 提交于 2019-12-10 23:54:59
问题 I am investigate possibility to switch to ElasticSearch from SphinxSearch . What is good about SphinxSearch - full-text search just work out of the bot on pretty good level. Make it work on ElasticSearch appeared not as easy as I expected. In my project I have search box with typeahead, means I stype Clint E and see dropdown with results including Clint Eastwood on the first place. Type robert down and see Robert Downey Jr. on the first place. All this I achieved with SphinxSearch out of the

sphinx 修改默认css样式

。_饼干妹妹 提交于 2019-12-10 20:07:35
首先在我的sphinx quickstart期间,我为我的源和我的构建选择了单独的文件夹选项。 这是一个三步过程: 1.为样式创建文档: 去哪? 在我的conf.py所在的同一目录中(在我的示例中是源代码),我为我的自定义静态文件(样式表,JavaScript)创建了一个文件夹。 我称之为定制。 在它里面,我为样式表创建了一个子文件夹:source/custom/css。 在这个子文件夹中,我将创建我的自定义样式:source/custom/css/my_theme.css。 2.告诉sphinx 现在我们必须告诉sphinx将此文档输出到build/_static/css中,这个目录是Read the Documents主题中包含的样式表所在的同一目录。 我们在conf.py中添加了以下行: html_static_path=[‘custom’]#Directory for static files。 搞定了。 现在,如果我们进行构建,我们将在同一个目录build/_static/css中拥有RTD样式(theme.css)和自定义的my_theme.css。 3.选择我们的自定义主题 现在我们要告诉sphinx使用我们自定义的my_theme.css,而不是RTD的。 我们在conf.py中添加了这一行: html_style=‘css/my_theme.css’

Some issues with Sphinx and PHP

谁说胖子不能爱 提交于 2019-12-10 18:08:07
问题 Here is the case: I have a big table in my database - 3.6 GB and 1,7M rows. Selecting with limit and offset from the table is extremely slow and often results in Error 504. Table is MyISAM, has multiple indexes and will be updated. That's why I decided to use Sphinx to list the contents of the table - in some cases without query (all the rows), in some cases with query - and it works like a charm. The speed is amazing. But here's the problem - without a query only the first 1,000 results are

全文检索引擎Sphinx之初体验

淺唱寂寞╮ 提交于 2019-12-10 14:08:54
Sphinx 是一个开源的全文检索服务,支持实时检索,号称高性能、高可用、易扩展。初次见面,来一次部署和 入门使用 吧。 首先,我们需要安装MySQL-Server和Sphinx (`sudo yum -y install mysql55-server sphinx`): 安装MySQL55-Sever,可能本机存在老版本的MySQL库而出现冲突。优雅的解决办法是: rpm -e --nodeps --justdb mysql-libs 装了MySQL55-Server,先启动、设置密码,导入示例数据库: service mysqld start /usr/bin/mysqladmin -u root password 'pAsSw0rD' mysql -uroot -p test < /usr/share/doc/sphinx-2.0.7/example.sql OK,修改sphinx配置文件`/etc/sphinx/sphinx.conf `中的MySQL帐号信息,然后建立索引再启动搜索服务: sudo indexer –all sudo service searchd start 最后,我们来验证搜索关键字功能`search test`: 如果想扩展一下,装上 sphinx-php 验证shpinx的api功能: sudo yum -y install sphinx-php