Nil's representation in the index?


#1

How are ruby nil values represented in the index?

Thanks,
John


#2

On Thu, Mar 29, 2007 at 06:34:15PM -0400, John B. wrote:

How are ruby nil values represented in the index?

not at all, I guess. Ferret works on strings, and it makes no sense to
store an empty string in the index.

cheers,
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
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa


#3

On Mar 30, 2007, at 3:33 AM, Jens K. wrote:

On Thu, Mar 29, 2007 at 06:34:15PM -0400, John B. wrote:

How are ruby nil values represented in the index?

not at all, I guess. Ferret works on strings, and it makes no sense to
store an empty string in the index.

I am trying to query for objects that match certain terms in field A,
and field B = nil in the model. (The column is untokenized)

John


#4

On Sat, Mar 31, 2007 at 01:20:50AM -0400, John Joseph B. wrote:

I am trying to query for objects that match certain terms in field A,
and field B = nil in the model. (The column is untokenized)

I think the only way to achieve this is to epresent the nil with some
non-nil value in the index (‘NIL’ or something like this) so you can
search for it.

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
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa


#5

On Mar 31, 2007, at 5:30 AM, Jens K. wrote:

I am trying to query for objects that match certain terms in field A,
and field B = nil in the model. (The column is untokenized)

I think the only way to achieve this is to epresent the nil with some
non-nil value in the index (‘NIL’ or something like this) so you can
search for it.

That’s precisely what I ended up doing. :slight_smile: Thanks.