Analysis of full-text search (SOLR) Front-end applications continued rails front-end analysis

Source: Internet
Author: User
Tags solr lucidworks netbeans

The first two articles briefly introduce the application of lucid and the core extension of SOLR. Now we will briefly look at how the interface presented to the front-end based on SOLR is implemented. This part of lucid providesSource codeSo it looks more convenient.

Last twoArticleThe content is as follows:

Analysis of front-end application of full-text search (SOLR) http://www.cnblogs.com/2018/archive/2011/07/29/2121519.html

Analysis on the front-end application of full-text search (SOLR)

Install and start

Install it in the rails directory

Javaw "-djava. AWT. headless = true-dlog4j. configuration = file :.. /CONF/log4j. XML "-jar .. /lib/jruby-complete-1.5.3.jar-R .. /lib/bundler. jar-s script/rails server-e production-P 8989

Load from the aboveProgramLoad the content of the rails directory

Java-jar "% lucidworks % \ Lib \ jruby-complete-1.5.3.jar"-s "% lucidworks % \ bin \ stop. RB" "% lucidworks %"

Jruby Overview

Www.jruby.org

Jruby is a Ruby interpreter implemented in pure Java. Through jruby, you can directly run the ruby program on the JVM and call the Java class library. Many Ruby ides written in Java use jruby to explain the syntax.

Jruby on rails

Http://book.51cto.com/art/200807/79142.htm

This project is run using the complete jar package of jruby. For details, refer

Http://spin.atomicobject.com/2010/02/01/running-a-ruby-application-with-jruby-complete/

Example of jruby on rails

Http://www.infoq.com/cn/news/2008/07/csi-disease-management-jruby

Directory structure and content

Data:SQLite is used, as shown below:

Rails \ dB \ production. sqlite3

View Projects

This project is designed using the rails framework of jruby. a better tool for ror management is netbeans 6. * [netbeans 7 requires independent download and installation of plug-ins]

Procedure:

1. Use the netbeans Wizard to create a new rails Project

2. Copy the nbproject directory under the new project to the rails directory.

3. Open with netbeans

Main functions of the MVC structure in the root directory:

Configuration Files: databases, internationalization, etc.

Data Model: Use activerecord

Helpers helper

Among them: api. RB api_base.rb under rails \ app \ models is the part of interaction with LWE core, which uses the rest service. Other models are inherited and implemented based on this basic object.

 

The main functions provided by the system are implemented in the form of plug-ins, specifically in:

Rails \ vendor \ plugins \ admin

Rails \ vendor \ plugins \ alerts

Rails \ vendor \ plugins \ search

The specific MVC view part uses the default ERB form and haml form, specific reference http://haml-lang.com/tutorial.html

 

Summary

Based on the above summary analysis, we can see that SOLR provides a wide range of extensions and implementations to meet our various project application needs, this part of lucid provides a good reference implementation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.