sphinxapi | Python version of Sphinx searchd client | REST library
kandi X-RAY | sphinxapi Summary
kandi X-RAY | sphinxapi Summary
Python version of Sphinx searchd client (Python API)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Updates the specified attributes .
- Opens the server .
- Close the socket .
- Escapes a string .
sphinxapi Key Features
sphinxapi Examples and Code Snippets
Community Discussions
Trending Discussions on sphinxapi
QUESTION
I build 2 searchd instance on different server(namely A and B) and build a distributed index on A. However, when I query A from client, I only got result from A's index. My problem is I cannot get result from B' index, I am pretty sure I configure correct.
I tried: * replace hostname with IP adresses * I am pretty sure that I have not get result from B's index
A's sphinx.conf
...ANSWER
Answered 2019-Sep-18 at 02:56I got it guys, I got it!
The problem is not on the server(A&B), I configured them correctly. It is becacuse I am not familiar with the API.Query()
API need to specify the key words as well as the queried index.
res = SphinxClient.Query("","distributed_index_name")
gives me the correct result!
If you encounter similar problems, be free to ask, I am happy to help.
QUESTION
I have two indexes for sphinx on my webserver for online movies website. 1st is for movies data, and 2d for actors data. Before i add 2nd index i used that code
...ANSWER
Answered 2018-Nov-26 at 11:39The '*' in the second param is just which index(es) to search.
QUESTION
In my MySQL database I have this result querying my data:
...ANSWER
Answered 2018-Oct-03 at 15:28I suspect it's mainly due to whole word matching. Sphinx matches whole words. With 'words' defined as per charset_table http://sphinxsearch.com/docs/current/conf-charset-table.html
ie MATCH('@email johndoe')
is only matching addresses with johndoe
in them as a word. default charset_table keeps .
-
and @
(common in emails!) all as separators so would match johndoe@domain.com
or email@johndoe.com
, but NOT email@myjohndoe.com
, the word being indexed is myjohndoe
not johndoe
Whereas mysql 'LIKE' will happy match part words. eg email like '%johndoe%'
would johndoesmith@domain.com
, johndoes555@domain.com
and 555@johndoes.com
or whatever. Its a pure substring match.
In short might want to tweak charset_table
. could .
-
and @
all be word chars, so email would be whole word.
alternatively might just enable part word matching with min_infix_len
.
http://sphinxsearch.com/docs/current.html#conf-min-infix-len
then could do MATCH('@email *johndoe*')
which would get much closer results.
complementary to min_infix_len
would be expand_keywords
http://sphinxsearch.com/docs/current.html#conf-expand-keywords
then the * wildcards would be added automatically, so could go back to MATCH('@email johndoe')
QUESTION
Good time of day!
There is such config Sphinx
...ANSWER
Answered 2017-Oct-04 at 17:19setFilter
takes an Array of values. And they need to be numeric (type_id
is a numeric attribute)
QUESTION
I have a Sphinx-Index-Table with ids, data and datatypes.
...ANSWER
Answered 2017-Jul-26 at 16:31Sphinx does not allow you to aggregate over fields that aren't scalars (e.g. integers). I'm assuming that the type
field is for some kind of a referential value. You could use another table, say type_dictionary
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sphinxapi
You can use sphinxapi like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page