sphinx

PHP/Sphinxsearch - searching for string or lat lng

你。 提交于 2019-12-11 16:53:22
问题 I need to find all results where city name matches string OR latitude and longitute is between given values. My index looks like this: sql_field_string = city sql_attr_float = lat sql_attr_float = lng Is there any way to use attributes in query? Or can I use in query values from $s->setSelect()? I know I can easily filter results using $s->setFilterFloatRange() but OR condition is essential for me in this case. This works fine: $s->SetFilterFloatRange('lat', $_GET['lat'] - $_GET['distance'],

Remove Open and Close Parentheses from Sphinx Index

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:49:14
问题 I have a regexp_filter that looks for a pattern in my documents e..g regexp_filter=Bob Smith=>Robert Smith However I've found this does not work when the pattern text is inside parentheses e.g.. he and my boss (Bob Smith) were due to.. I have tried a few things to get rid of the ( Added ( to the Stopwords Added a custom charset that does NOT include parens But regardless patterns are not matched when they are inside parentheses. Is there anyway to do this correctly? Update is that precisely

c++ Sphinx rt_attr_string truncates data

别说谁变了你拦得住时间么 提交于 2019-12-11 15:45:18
问题 I'm inserting the content of my documents in an rt_attr_string field. I have declared the max_packet_size as 128M . However, my input string of 5075850 characters is truncated to a string of 881546 characters. How is this possible and how can I overcome this unexpected behavior? I have already checked the inserted strings. They contain valid characters between a-Z, 0-9 and _ ; or ? Therefore, why is Sphinx behaving like this? The queried value is directly queried after the insert statement

Searching and sorting by a float field with thinking sphinx

馋奶兔 提交于 2019-12-11 12:27:24
问题 I'm using thinking sphinx to for search on a rails app. I have a float field called 'height'. I need to be able to search this field for exact values (i.e. exactly 6.0, not 6.5). I also need to be able to sort on the field. What I have so far: indexes height, :sortable => true Problem: doesn't sort properly, returns 6.0 and 6.5 if I search for '6' 回答1: If you're dealing with float values, it's best to have them as an attribute instead of a field: define_index do # ... other fields has height

JDBC MYSQL Connection without specifying database?

我是研究僧i 提交于 2019-12-11 11:45:06
问题 I am using the SphinxQL MySQL client which stores indexes as "tables" but has no real notion of a "database"...One specifies the port (9306 in my case) at which the sphinx mysql instance listens and in theory should be able to communicate as normal. I have the following test code: import java.sql.*; public class Dbtest { public static void main (String[] args) { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost

searching in a part of word with Sphinx

牧云@^-^@ 提交于 2019-12-11 10:36:22
问题 I need to configure Sphinx to search for parts of word, not whole. It's written on the official site, that I should use directives 'min_infix_len', 'min_prefix_len' and 'enable_star'. Actually, all registered in the config file. But search in a word part doesn't work. * in the beginning or end of a word is not helping. source src1 { type= mysql sql_host= localhost sql_user= root sql_pass= sql_db= ajax sql_port= 3306 sql_query= \ SELECT id, bookauthor FROM authors sql_query_info= SELECT * FROM

sphinx search for partial keyword matches

[亡魂溺海] 提交于 2019-12-11 09:59:13
问题 Ruby on Rails -> ThinkingSphinx -> SphinxSearch -> Mysql I want to search the titles table. The expected user keyword will not be an exact match, it will be a partial match. search_key = "android samsung galaxy ace black phones" Searching against the titles table, titles(table) id | titles 1 | nokia c6 2 | samsung galaxy ace 3 | samsung galaxy ace y 4 | nokia lumia 800 5 | samsung monte 6 | samsung galaxy note case - 1 : Title.search search_key, :match_mode => :all =>No results Comment: Bad

Indexing for Sphinx of legacy data generating some errors

可紊 提交于 2019-12-11 09:59:04
问题 A rails 3.2.18 application is being created, migrating data from a rails 2.3.10 application. Data is being ported over via pg_dump and loaded via psql command, without any errors. One model of the 13 that are indexed via thinking_sphinx is getting some errors. Only 1 in 8.5 docs is being indexed overall. indexing index 'norm_core'... ERROR: index 'norm_core': sql_range_query: ERROR: integer out of range (DSN=pgsql://jerdvo:***@localhost:5432/fna_development). total 1019 docs, 234688 bytes The

Sphinx in C++ (Linux)

六眼飞鱼酱① 提交于 2019-12-11 07:02:57
问题 This time I want to implement Sphinx in Linux . Please give me the API required to do the same or the concerned link will also do. Although I found many for PHP, however none for C++. I have also used GTKmm in my application. 回答1: There is no API to do this. Sphinx will process text files in reStructuredText format and turn them into documentation. The ability to extract documentation from source code is only present for python code. For other languages you will need to put the documentation

could not start the sphinx search service on local computer?

孤人 提交于 2019-12-11 06:58:42
问题 i am getting this Windows could not start the SphinxSearch service on Local Computer. Error 1067: The process terminated unexpectedly. i got installation instruction from this . http://blog.robbsnet.com/2011/07/how-to-install-and-implement-sphinx.html build process is complete but when i start the sphinx search service i got errors . 回答1: Try running searchd manually from Command Prompt. Maybe it will give you a useful error message. Try also looking in searchd.log 回答2: For anyone who is