I am using Sphinx Search in which I have simple join query which fetch results from 2 tables.
In my one table I have Column 'Fields'. 'Fields' column contain different values like 'News', 'Page', 'Blog' etc.
The searching is working fine. I just want that documents having type 'NEWS' must be shown in last.
I search a word 'Content' and in search result I got 15 results i.e:
10 documents with type 'Page',
2 documents with Type 'Blog'
'3' results with type 'NEWS'
I want that records with type 'NEWS' will always rank lower.
Here is my query:
select n.nid as ID, n.title, n.status, n.created, f.field_body_value
from node n
inner join field_data_field_body f on (n.nid = f.entity_id)
where n.status = 1;
Do I need to update my query or do any setting in Sphinx.conf?