Answer the question
In order to leave comments, you need to log in
How to search using Sphinx?
There is a database of cars. The task is to find from the table the most similar modification of the car by an arbitrary line.
I get the data for the index in sphinx.conf with the following request
SELECT car_modification.id_car_modification as id,
car_modification.name as modification,
car_serie.name as serie,
car_generation.name as generation,
car_generation.year_begin as year_begin,
car_generation.year_end as year_end,
car_model.name as model,
car_model.name_rus as model_rus,
car_mark.name as mark,
car_mark.name_rus as mark_rus
FROM car_modification
LEFT JOIN car_serie ON car_modification.id_car_serie=car_serie.id_car_serie
LEFT JOIN car_generation ON car_serie.id_car_generation=car_generation.id_car_generation
LEFT JOIN car_model ON car_generation.id_car_model=car_model.id_car_model
LEFT JOIN car_mark ON car_model.id_car_mark=car_mark.id_car_mark
$result = $cl->Query("Хундай санта фе 2008"); // поисковый запрос котрый выдает не верные результаты
Answer the question
In order to leave comments, you need to log in
1) none, translate on the php side
2) this logic will also have to be done in php
3) isolate the year in php and make a separate filter for it in
sphinx there is no magic it's just a search engine by text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question