# Are document boost and sort incompatible?

**URL:** <https://www.ruby-forum.com/t/are-document-boost-and-sort-incompatible/162511>\
**Category:** Ferret\
**Created:** [March 10, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/are-document-boost-and-sort-incompatible/162511 "2009-03-10T18:28:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![plambert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@plambert](https://www.ruby-forum.com/u/plambert)\
**Post date:** [March 10, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/are-document-boost-and-sort-incompatible/162511/1 "2009-03-10T18:28:31Z")

</div>

I am using document boosting (following Jens’ suggestion here:  
[Document Boost in acts\_as\_ferret? - Ferret - Ruby-Forum](http://www.ruby-forum.com/topic/84358)) but am also trying to sort the  
returned results, so I was using the :sort option. In my testing, using  
a wildcard search, it appears that using the :sort option causes Ferret  
to ignore document boosts and just return the first N hits it finds by  
looking alphabetically. Is that the expected behavior? If I want the N  
most relevant documents, do I need to sort them myself after getting  
them from Ferret?

Thanks,  
–Paul

---

<div class="post-metadata">

**Author:** ![plambert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@plambert](https://www.ruby-forum.com/u/plambert)\
**Post date:** [March 10, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/are-document-boost-and-sort-incompatible/162511/2 "2009-03-10T19:33:08Z")

</div>

Hi Paul,

I think your assumption is correct - Ferret by default sorts by score,  
and by specifying an alternative sorting you replace that default  
sorting with something else.

Cheers,  
Jens

On 10.03.2009, at 18:28, Paul L. wrote:

> them from Ferret?
> 
> ## Thanks, –Paul
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Ferret-talk mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/ferret-talk](http://rubyforge.org/mailman/listinfo/ferret-talk)

–  
Jens KrÃ¤mer  
webit! Gesellschaft fÃ¼r neue Medien mbH  
SchnorrstraÃŸe 76 | 01069 Dresden  
Telefon +49351467660 | Telefax +493514676666  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold
