What is the most productive frontend infrastructure for use with SOLR as a backend?

Want to create a web application using SOLR as your only backend. Most of the data will be stored in SOLR through stand-alone jobs, although there is some need for CRUD.

Look at the popular web frameworks today such as Rails, Django, web2py, etc., despite NoSQL, the sweet spot for performance is still like active record implementations sitting on top of RDBMS.

What is the best performance framework for building web applications with SOLR as a backend?

+4
source share
4 answers

The Web2py database abstraction layer does not support SOLR at this time, which means that you cannot use the DAL syntax to access SOLR, and you cannot use automatically generated forms from the SOLR DB schema. However, you can create forms using SQLFORM.factory as if you had a normal relational database and manually insert / update / select / update SOLR. web2py includes libraries for parsing / writing both JSON and XMl, so it will be easy to implement the SOLR API in a few lines of code. If you put this on the web2py mailing list, we can help with some examples.

EDIT (copied from response to web2py mailing list):

Usually in web2py you define a model

db.define_table('message',Field('body')) 

and then web2py generates and processes the forms for you:

 form=SQLFORM(db.message) if form.accepts(request.vars): do_something 

In your case, you will not use define_table, since web2py DAL does not support SOLR, and you cannot create forms from a schema, but you can set this: http://code.google.com/p/solrpy/ and you can do

 #in model import solr s = solr.SolrConnection('http://example.org:8083/solr') #in controller form=SQLFORM.factory(Field('body')) if form.accepts(request.vars): s.add(mody=request.vars.body) s.commit() do_something 

So the difference is in SQLFORM.factory instead of SQLFORM and an extra line after adoption. That's all.

+2
source

All three of the above answers are great recommendations for the development framework. I would turn your question around and ask: “What is the best web application structure for me” and not “what is best with Solr” and make a decision based on your skills, the community that you have around, and other soft factors. Especially if you are completely agnostic, which way to go.

If you have friends who love Grails and can help you get started, then Grails may be the way to go. Is there a Python group that meets regularly? Then Django has something to offer. I personally love Rails, and so I would recommend rails. But this is just a "What I like" recommendation compared to "which is better."

The great thing about Solr is how agnostically it touches the front end. He plays well in many environments!

+2
source

I would use Sunspot 1.2 and Rails 3.

Sunspot is commonly used as an ActiveRecord extension, but is also an ORM agnostic. Rails 3 disabled ActiveRecord from the framework, which made it easier to work without ORM.

http://outoftime.github.com/sunspot/

+1
source

By the way, SphinxSearch is much faster than solr / lucence and many unique features. Search accuracy is much better than my experience and independent tests.

it has a native, very simple python api, and it integrates well with web2py.

but for this you need a DBMS. I use it, web2py + sphinxsearch, creating a search engine for office files.

You can also try.

www.sphinxsearch.com

0
source

All Articles