View Full Version : Lucene Integration Roadmap
cwidhelm
Nov 10th, 2005, 03:20 PM
I have seen a couple posts about the Lucene integration with Spring.
Is there a roadmap or feature list of what will be integrated? How is Lucene going to work inside the framework?
I am getting ready to explore integrating searching functionality into our application and curious about what gap this implementation will fill.
Thanks
Costin Leau
Nov 11th, 2005, 11:05 AM
Lucene integration exists inside Spring Modules inside the sandbox. However the project is fairly mature (includes documentation). It's not polished completely but clearly usable - I have just used it inside a project.
There aren't many issues holding it back - rather some improvements for advance uses.
You can get the code from CVS and use the users@springmodules.dev.java.net list for more questions.
As for the roadmap the big problem is that the maintainer and author (Thierry Templier) is swamped in work at the moment. This however should be solved in the near future.
twoencore
Dec 20th, 2005, 08:50 AM
for advance use of lucene you need add support for some of property settings..merge docs,etc..
Costin Leau
Dec 22nd, 2005, 06:41 AM
Jeryl can you make the suggestions on spring modules mailing list? There is undergoing work to improve the lucene support and feedback is always welcomed.Thanks
twoencore
Jan 28th, 2006, 11:26 AM
our team had to update the module that the orginal developer of spring-lucene..we are tyring to locate in the CVS..but can't seem to find it has it moved??? cant seem to find the spring-module either..i checked out the entire proejct /cvsroot/springframework
we plan to update the module with proper settings and add additional advance functions and submit the update.
Costin Leau
Jan 28th, 2006, 11:51 AM
It is located here : https://springmodules.dev.java.net/source/browse/springmodules/projects/lucene/
(it was moved under lucene folder).
Pls, send an email to the SM mailing list about what you plan to add - I know that Thierry has worked on it in December but I'm not sure he placed everything on the CVS. I'll ask him and see what's the status.
templth
Feb 2nd, 2006, 02:32 AM
Hi all,
I have commited my changes in the cvs yesterday.
The current sources of the Lucene support are located in the projects/lucene directory in the cvs of spring modules...
I'd be pleased to discuss with you (in this forum or in the mailing list of spring modules) in order to use or improve it ;-)
Thierry
Thorsten Roskowetz
Feb 10th, 2006, 08:51 AM
What are the advantages or disadvantages of using Springmodules Lucene integration in contrast to the Compass Framework?
http://www.compassframework.org/display/SITE/About
Best regards,
Thorsten
matthewramella
Feb 10th, 2006, 02:50 PM
I have not had a chance to look at Springmodules Lucene, but I have implemented Compass into my application with Spring & Hibernate. I must say that I've been very impressed with the Compass framework. Shay Banon, the creator of Compass, has done an excellent job. His sample app shows you exactly how to integrate with an existing app. I had my app up and running with Compass in about 2 hours. I highly recommend it!
Costin Leau
Feb 11th, 2006, 07:35 AM
I would say that SpringModules Lucene integration is a very thin layer on top of Lucene which makes working with it a lot easier and faster. I haven't used Compass so I can't do a proper comparison but Compass seems more like an ORM while Lucene integration more like JDBC.
cilativ
Feb 11th, 2006, 03:19 PM
I have not had a chance to look at Springmodules Lucene, but I have implemented Compass into my application with Spring & Hibernate. I must say that I've been very impressed with the Compass framework. Shay Banon, the creator of Compass, has done an excellent job. His sample app shows you exactly how to integrate with an existing app. I had my app up and running with Compass in about 2 hours. I highly recommend it!
Is there somewhere a sample application for Compass? At the level of Hello World. Compass has a detail reference documentation but not one complete simple example. I don't have time to study all documentation.
Costin Leau
Feb 12th, 2006, 04:50 AM
Probably you would get better answers from their forum/mailing lists. I know there is a petclinic sample but I'm not familiar with its details.
matthewramella
Feb 13th, 2006, 07:34 AM
Yes, there actually is a very nice sample app using Spring MVC and Hibernate. Costin is correct, it is the petclinic sample app. You can download the entire framework (which includes the petclinic sample app) here:
http://www.compassframework.org/display/SITE/Downloads
Also, the Spring MVC Controllers, JSP's and application-context config files have already been written, so there's very little work involved (if you're already using Spring MVC and Hibernate). The Controllers are located here:
\compass-0.8.1\modules\spring\src\org\compassframework\spri ng\web\mvc
and the JSP is located here:
\compass-0.8.1\samples\petclinic\war\WEB-INF\jsp\search.jsp
within the downloaded zip file.
Hope this helps!
cilativ
Feb 13th, 2006, 10:20 AM
Thanks. I was playing with the simplest example that they have: "library", and simplified it even further and created a little getting started tutorial.
http://www.jroller.com/page/cilativ?entry=getting_started_with_compass
Thorsten Roskowetz
Feb 14th, 2006, 07:11 AM
Thanks cilatev, Costin and Matthew.
I guess which one of the two integration layers to choose depends on the needs of the project; the comparison to JDBC and ORM sums this up perfectly.
Cheers,
Thorsten
vishwanath13
Feb 13th, 2008, 04:41 AM
Hi All,
I was able to configure the Compass in my application which contains Struts, Spring, Hibernate.
But I am facing problem, while accessing the search or reindex page which were made as sample to test. I am getting Page Not Found and when I see in the console, there is no error message even, I am placing the messages which have come in the console and also the set of configuration files below.
In Console:
-----------
15:19:23,317 WARN [LoggerListener] Authentication event AuthenticationSuccessEvent: stephen; details: org.acegisecurity.ui.WebAuthenticationDetails@fffd 148a: RemoteIpAddress: 127.
0.0.1; SessionId: 81A374DE9B592823D596D99CA7CC2B05
15:19:23,333 WARN [LoggerListener] Authentication event InteractiveAuthenticationSuccessEvent: stephen; details: org.acegisecurity.ui.WebAuthenticationDetails@fffd 148a: RemoteIpAd
dress: 127.0.0.1; SessionId: 81A374DE9B592823D596D99CA7CC2B05
15:19:28,661 WARN [PropertiesBeanDefinitionReader] Use of 'class' property in [org.springframework.beans.factory.support.Properti esBeanDefinitionReader] is deprecated in favor of
'(class)'
15:19:28,661 WARN [PropertiesBeanDefinitionReader] Use of 'class' property in [org.springframework.beans.factory.support.Properti esBeanDefinitionReader] is deprecated in favor of
'(class)'
15:19:28,661 WARN [PropertiesBeanDefinitionReader] Use of 'class' property in [org.springframework.beans.factory.support.Properti esBeanDefinitionReader] is deprecated in favor of
'(class)'
15:19:28,661 WARN [PropertiesBeanDefinitionReader] Use of 'class' property in [org.springframework.beans.factory.support.Properti esBeanDefinitionReader] is deprecated in favor of
'(class)'
15:19:28,661 INFO [GenericWebApplicationContext] Refreshing org.springframework.web.context.support.GenericWeb ApplicationContext@214a7a: display name [org.springframework.web.cont
ext.support.GenericWebApplicationContext@214a7a]; startup date [Wed Feb 13 15:19:28 IST 2008]; parent: org.springframework.web.context.support.XmlWebAppl icationContext@14fab65
15:19:28,677 INFO [GenericWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.GenericWeb ApplicationContext@214a7a]: org.springfram
ework.beans.factory.support.DefaultListableBeanFac tory@1b8d82
15:19:28,677 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1b8d82: defining beans [searchR
esultsView,reindexResultsView,searchView,reindexVi ew]; parent: org.springframework.beans.factory.support.DefaultL istableBeanFactory@17dabf4
views.properties
----------------
searchView.class=org.springframework.web.servlet.v iew.JstlView
searchView.url=/WEB-INF/pages/search.jsp
searchResultsView.class=org.springframework.web.se rvlet.view.JstlView
searchResultsView.url=/WEB-INF/pages/search.jsp
reindexView.class=org.springframework.web.servlet. view.JstlView
reindexView.url=/WEB-INF/pages/reindex.jsp
reindexResultsView.class=org.springframework.web.s ervlet.view.JstlView
reindexResultsView.url=/WEB-INF/pages/reindex.jsp
search-servlet.xml
------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
- DispatcherServlet application context for web tier.
-->
<beans>
<!-- ========================= MESSAGE SOURCE DEFINITION ========================= -->
<!--
- Message source for this context, loaded from localized "messages_xx" files.
- Could also reside in the root application context, as it is generic,
- but is currently just used within web tier.
-->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundle MessageSource">
<property name="basename"><value>messages</value></property>
</bean>
<!-- ========================= MAPPING DEFINITIONS ========================= -->
<!--
- This bean provides explicit View mappings in a resource bundle instead of the
- default InternalResourceViewResolver. It fetches the view mappings from
- localized "views_xx" classpath files, i.e. "/WEB-INF/classes/views.properties"
- or "/WEB-INF/classes/views_de.properties".
-
- Symbolic view names returned by Controllers will be resolved by this bean
- using the respective properties file, which defines arbitrary mappings between
- view names and resources.
-->
<bean id="rbViewResolver" class="org.springframework.web.servlet.view.ResourceBundl eViewResolver">
<property name="basename"><value>views</value></property>
<property name="defaultParentView" value="parentView"/>
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResou rceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
<!--
- This bean resolves specific types of exception to corresponding error views.
- The default behaviour of DispatcherServlet is to propagate all exceptions to the
- servlet container: This will happen here with all other types of exception.
-->
<bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMapp ingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="org.compass.core.CompassException">dataAccessFailure</prop>
<prop key="org.springframework.dao.DataAccessException">dataAccessFailure</prop>
<prop key="org.springframework.transaction.TransactionExcepti on">dataAccessFailure</prop>
</props>
</property>
</bean>
<!--
- This bean is an explicit URL mapper that is used by the DispatcherServlet
- It is used instead of the default BeanNameUrlHandlerMapping.
-->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlH andlerMapping">
<property name="mappings">
<props>
<prop key="/search.htm">searchController</prop>
<prop key="/reindex.htm">indexController</prop>
</props>
</property>
</bean>
<!-- ========================= CONTROLLER DEFINITIONS ========================= -->
<bean id="searchController" class="org.compass.spring.web.mvc.CompassSearchController">
<property name="compass"><ref bean="compass"/></property>
<property name="searchView"><value>searchView</value></property>
<property name="searchResultsView"><value>searchResultsView</value></property>
<property name="pageSize"><value>10</value></property>
</bean>
<bean id="indexController" class="org.compass.spring.web.mvc.CompassIndexController">
<property name="compassGps"><ref bean="compassGps"/></property>
<property name="indexView"><value>indexView</value></property>
<property name="indexResultsView"><value>indexResultsView</value></property>
</bean>
</beans>
and configured DispatcherServlet in web.xml file.
There is one more issue, when I tried to access ReIndex link it shows the following issue
Exception:
----------
javax.servlet.ServletException: Could not resolve view with name 'indexView' in servlet with name 'search'
at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1124)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:878)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:792)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
Please give me the solution... looking forward for the response.....
Thanks in advance
Colin Yates
Feb 15th, 2008, 04:49 AM
If this is an issue with the sample, would you mind raising this as a JIRA please (jira.springframework.org).
Thanks.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.