lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Date Sat, 17 Feb 2007 01:57:06 GMT
On 2/16/07, Erik Hatcher <> wrote:
> A recent e-mail from Mr. KinoSearch to java-user has a quote that I
> wanted to point out here:
> Begin forwarded message:
> > KS 0.20 doesn't even have Document or Field classes.  :)  They've
> > been eliminated, and native Perl hashes are now used to transport

> > document data.
> I think we could simplify (wow, even at this early stage) the solrb
> code a bit by simply representing a document as a Hash.  For
> multiValued data, the values would be arrays.

That's how it works with the simple python client... I like to use
natives when possible.

Example usage from
from solr import *

c = SolrConnection(host='localhost:8983', persistent=True)
c.add(id='500',name='python test doc')
print'id:[* TO *]', wt='python', rows='10',indent='on')

The separate params to add is just syntactic sugar for a map (I
believe ruby has the same thing).  Adding multiple documents is done
as an array-of-map.

> Do we really need any
> other semantics at the solrb level, or does a Hash convey it all?

Perhaps you could still use a hash, but the value could optionally be
a boosted value... is it possible to annotate any value in Ruby, or is
a separate BoostedValue class needed?

Might want to keep in mind updateable documents for the future.  Not
sure how you would want them represented, but it looks like there will
be a separate param (or parameters) telling solr how to update
different fields (append, overwrite, increment, remove, etc)


View raw message