Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: ruby-dev

optional dependencies

 

 

Lucene ruby-dev RSS feed   Index | Next | Previous | View Threaded


erik at ehatchersolutions

Apr 27, 2007, 3:02 AM

Post #1 of 3 (1423 views)
Permalink
optional dependencies

We have one class that I added (xpath_mapper) that relies on a 3rd
party gem (libxml). This particular one can be refactored to fall
back to REXML if libxml is not installed, as we do with the rest of
solr-ruby. However, we have a cool HpricotMapper contribution
(thanks Jamie!) pending in JIRA: http://issues.apache.org/jira/browse/
SOLR-210

How should we incorporate this so as to not negatively impact those
that don't have Hpricot installed? In other words, what's the
recommended Rubyism for this?

Anyone tried out the Mapper stuff besides Jamie and I? It's become
my favorite way to push data into Solr.

Thanks,
Erik


antonio_eggberg at yahoo

Apr 27, 2007, 3:20 AM

Post #2 of 3 (1321 views)
Permalink
SV: optional dependencies [In reply to]

>
> Anyone tried out the Mapper stuff besides Jamie and I? It's become
> my favorite way to push data into Solr.

I have tried the xpath_mapper and it works great. Faster then I thought. I
am toying with the idea of making commit limit i.e. make a solr commit after
x number of entries. I been meaning to try the hpricot mapper but never
got around to it.

I like to make an atom mapper any advice?

Cheers


Låt vårkänslorna spira.
Hitta din tvillingsjäl på Yahoo! Dejting: http://se.meetic.yahoo.net


erik at ehatchersolutions

Apr 27, 2007, 3:43 AM

Post #3 of 3 (1302 views)
Permalink
Re: SV: optional dependencies [In reply to]

On Apr 27, 2007, at 6:20 AM, Antonio Eggberg wrote:
>> Anyone tried out the Mapper stuff besides Jamie and I? It's become
>> my favorite way to push data into Solr.
>
> I have tried the xpath_mapper and it works great. Faster then I
> thought.

That's surely because it uses libxml instead of the, *cough*
pathetic, REXML library.

Glad to hear at least someone outside of my office has used it :)

> I
> am toying with the idea of making commit limit i.e. make a solr
> commit after
> x number of entries.

Solr has an auto-commit feature that will do exactly this for you.
Look for "autocommit" here: <http://wiki.apache.org/solr/SolrConfigXml>

> I like to make an atom mapper any advice?

Seems like it could build on top of the xpath_mapper, no? What type
of object would you be passing to the mapper? A Mapper only requires
that an object implement the #[] method for looking up values. The
xpath_mapper overrides that lookup mechanism to instead use an XPath
on the passed in DOM object. With knowledge of the type of object
you'll be mapping, creating a mapper shouldn't be too difficult.

Erik

Lucene ruby-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.