Forum: Ferret nil's representation in the index?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John B. (Guest)
on 2007-03-30 03:09
(Received via mailing list)
How are ruby nil values represented in the index?

Thanks,
John
Jens K. (Guest)
on 2007-03-30 11:46
(Received via mailing list)
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
John Joseph B. (Guest)
on 2007-03-31 09:28
(Received via mailing list)
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
Jens K. (Guest)
on 2007-03-31 13:30
(Received via mailing list)
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
John Joseph B. (Guest)
on 2007-03-31 20:00
(Received via mailing list)
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. :) Thanks.
This topic is locked and can not be replied to.