How to configure Sphinx to searched by tags and displays the results by relevance?
Have the task to do a database search of spare parts from suppliers, it is this:
Our company is engaged in repair of mobile equipment and we need when a customer calls
according to the type of services and type of model to do the database search providers (which are already flooded and
indexed Sphinx ohms).
iPhone 5s display Replacement
We refer to our tag database where it is spelled out for the service, the Replacement of the display the following tags:
(LCD, touchscreen, Assembly, lcd, touch, digitizer and so on let's say 10 pieces tags)
Then we crushed the brand name of the spaces in the tags that is an array
We need to search was by tags, and output the results of the TOP 100 matching
Even if we say we have a base of 300 lines, of which if you look at the tags below were all
tags in the rows, even if there will be 50 pieces, then the remaining 50 in any case should be
shown (even if not found at least 1 tag) - that is, the desired output by relevance. If
for example, we conclude 300 lines are displayed all the rows from the database, but will be shown
by relevance (number of occurrences of the tags, then there is a Line with 10 tags will be on
1, from 9 to 2, and so on.)
janis_Schneider answered on September 19th 19 at 13:11
Sphinx, by default, sorts by relevance, with relevance you suspect is not relevant.
Nedra_Altenwerth answered on September 19th 19 at 13:13
I think Your volume is easier to do a search with SQL server than to connect the Sphinx.
But if you want all the same Sphinx, just create a config index obtained by the sql query and look for it id records ordered by relevance(in the dock there are a few relatives rancheros, I think one of them will suit you well, or write your own custom). Then it will all just get records from database by Id and give the user.