Sphinx: search result.


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/code-flow.club/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
8 views
In fact, he began to deal with the Sphinx. Staged, configured, and built the index. Made the search ("find->word").

And that's what I do not understand - whether the Sphinx in the search results give all the fields?

Let's say I set
sql_query = SELECT id,name,surname FROM test;


And looking at the part of the word "You." How do I get another id in addition to name and surname? Logic dictates that if I can find all "You"<b>, the index stores and the name and surname, so why should I once again ask the database about their names by ID, if I can get them from sphinx. It is not clear.


PS: I Admit that it's very simple, but a quick search on documentation not natolknuli me a bright idea.
by | 8 views

4 Answers

0 like 0 dislike
By default, Sphinx fulltext fields to store and retrieve not possible (because they just never stored as full values so the indexes of the Sphinx)
\r
In 1.10-beta has the opportunity to store string attributes (and get them in a selection results).
\r
If you want to use a string attribute for fulltext search, it must be described as sql_field_string
The maximum size of a value is 4 megabytes
\r
We must remember that attributes the Sphinx always keeps in RAM, so if you nasosnaya many string attributes you may have problems with the RAM
by
0 like 0 dislike
Apparently, You did not initially understand how it works. Return the id of the document (primary key) in the order that was specified when search (sorting, relevantist and so forth), then through the id pull the rest of the data, and not to violate the order should be applied in the query ORDER BY FIELD
by
0 like 0 dislike
Only from the console, otherwise it gives only the id-field. Knowing the id of problems with finding the additional fields do not typically occur
by
0 like 0 dislike
In 1.10-beta seems to have the ability to store strings (previously had only numbers, etc.):
\rsphinxsearch.com/docs/manual-1.10.html#conf-sql-attr-string
\rsphinxsearch.com/docs/manual-1.10.html#conf-sql-field-string
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Jun 6, 2019 by ruslanyugov
0 like 0 dislike
1 answer
asked Jun 8, 2019 by gibigate
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
110,608 questions
257,186 answers
0 comments
22,115 users