Problems with sorting of search results

Hey …

maybe someone got a hint for me … I’ve got a
problem with the sorting of search results …
strangely enough, the sorting is fine on my mac
development environment, but not okay on my
linux live system.

I got a field in my index called hierarchy. It
contains long strings like:

Living together > Family > Brother-In-Law
Living together > Family > Marriage > Wife
Language and Communication > Language > Language Family > Finnish

Now i want the results to be sorted by that
hierarchy field, but it seems to be sorted
randomly … i tried both :sort => “hierarchy”
as well as

:sort => SortField.new(:hierarchy, :type => :string)

i get differently sorted results, using the SortField
or the string parameter, but neither are in the
correct order. As i said, the sorting on my local
development machine is fine, it’s sorted the
way i would expect it …

I use ferret 0.11.4 with ruby 1.8.5 on both machines.

anyone got an idea or similar problems?

Ben

On Mon, Jul 09, 2007 at 11:34:37AM +0200, Benjamin K. wrote:

Living together > Family > Brother-In-Law
Living together > Family > Marriage > Wife
Language and Communication > Language > Language Family > Finnish

are you sure this field is untokenized? Maybe you changed this field
lately to be untokenized and have to rebuild the index on the live
system?

Jens


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa

On 2007-07-09, at 11:34 AM, Benjamin K. wrote:

maybe someone got a hint for me … I’ve got a
problem with the sorting of search results …
strangely enough, the sorting is fine on my mac
development environment, but not okay on my
linux live system.

Hey …

for some reason, the field_infos were gone (or weren’t
created) on my live index. The ferret-browser is a cool
tool to verify the settings for each field. So if you’re
experiencing sorting problems, double check if your
field is really :untokenized, before posting to a ml :wink:

Ben