Missing Ferret 0.9.0 Field methods

The following instance methods seem to be missing from the
Ferret::Document::Field class in Ferret 0.9.0 using compiled C
extensions: #string_value, #reader_value and #binary_value. They are in
the pure ruby implementation).

I got round it by mixing in hacked versions of the pure Ruby methods
(@data replaced by self.data).

Many thanks for Ferret it’s shaping up to being a killer app for Ruby.

Hi Stuart,

Just curious. What do you use those methods for? I didn’t bother
including them because I didn’t think anyone would need them. It
seemed simpler just to have the one method that returned the data as a
string. I hope I can help.

Cheers,
Dave

David B. wrote:

Hi Stuart,

Just curious. What do you use those methods for? I didn’t bother
including them because I didn’t think anyone would need them. It
seemed simpler just to have the one method that returned the data as a
string. I hope I can help.

The #string_value is used in the Rails HowToIntegrateFerretWithRails
demo application on the Rails Wiki
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails

It is used in the ./app/views/search/get_results.rhtml template for
example:

I don’t know Lucene well enough to know wether there’s an alternative
way of doing the the same thing.

I’ve not come across any usage of the other two methods.

Apologies for the time taken to reply, I’ve only just spotted your
reply.

Cheers, Stuart

Cheers,
Dave

On 4/14/06, Stuart R. [email protected] wrote:

http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails

It is used in the ./app/views/search/get_results.rhtml template for
example:

I don’t know Lucene well enough to know wether there’s an alternative
way of doing the the same thing.

All add the string_value method for backwards compatibility but you
can just use the data method instead.

I’ve not come across any usage of the other two methods.

Apologies for the time taken to reply, I’ve only just spotted your
reply.

No worries, I took even longer to reply.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs