Answer the question
In order to leave comments, you need to log in
Sphinx: search result for a word?
Actually, I began to deal with the Sphinx. Delivered, configured, constructed an index. Performed a search (“find-> word”).
And here's what I don't quite understand - can Sphinx return all fields in the search results?
Let's say I install
sql_query = SELECT id,name,surname FROM test;
Answer the question
In order to leave comments, you need to log in
By default, it is not possible to store and receive fulltext fields in the sphinx (because they are simply not stored anywhere as a full value, this is how the sphinx indexes are arranged).
In 1.10-beta, it became possible to store string attributes (and receive them in the selection results).
If you want to use a string attribute for fulltext search, then it must be described as sql_field_string The
maximum value size for it is 4 megabytes
It must be remembered that the sphinx always keeps all attributes in RAM, so if you create a lot of string attributes, you may have problems with the RAM
Apparently, you initially did not understand how it works. The document id (primary key) is returned in the order that was specified during the search (sorting, relevance, etc.), then the rest of the data is pulled out by these id, and in order not to disturb the order, it is necessary to apply ORDER BY FIELD in the query
Only from the console, otherwise it returns only id fields. Knowing the id of problems with finding additional. fields usually do not appear
1.10-beta seems to have the ability to store strings (previously only numbers etc.):
sphinxsearch.com/docs/manual-1.10.html#conf-sql-attr-string
sphinxsearch.com/docs/manual- 1.10.html#conf-sql-field-string
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question