Is this type of sorting possible?

Hi guys,

I have a small instance of ES that has indexed a bit over 1k documents with fields like: title, description, date_added, last_updated.

The title and description are using this analyzer:

'stringLowercase' => array(
    'type'		=> 'custom',
    'tokenizer' => 'keyword',
    'filter' 	=> array('standard', 'lowercase', 'stop', 'minimalEnglishStem')
),

(minimalEnglishStem is just the minimal_english stemmer)

At this moment, we're doing wildcard searches on the title and description and we give the title a higher boost than we give to description, which overall works fine, so let's say i am searching for the word seo i get all the posts which contain the word in either title or description ordered by the date they have been added.

What we would like to do, is to order the results so that we put the ones having the word seo in the title first and then at the end, the ones that contain the word seo in description.

Is this doable somehow?
Thank you.

Have a look at field boosting in the multi_match query.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.