I guess you will get much more help on the spring mailinglist than you
will get from java-users.
you problem is related to your configuration and not to lucene as far
as I can tell.

simon

On Thu, Jul 16, 2009 at 12:20 PM, Pablo Mosquera
Saenz<pablomosqu...@gmail.com> wrote:
> Hi, I have downloaded the springmodule for lucene, version 0.9 and tried to
> test the sample
>
> I have used the lucene core library 2.4.1
>
> The first problem I found is that with the initial configuration
>
>     <bean id="searcherFactory"
> class="org.springmodules.lucene.search.factory.SimpleSearcherFactory">
>        <property name="directory" ref="fsDirectory"/>
>    </bean>
>    <!--
>    <bean id="searcherFactory"
> class="org.springmodules.lucene.search.factory.SingleSearcherFactory">
>        <property name="directory" ref="fsDirectory"/>
>    </bean>
>     -->
>
> With SingleSearcherFactory, in the startup I have an error because there is
> no segment* file created and the context inizialization fails. I tried with
> SimpleSearcherFactory and the server starts up
>
> I then tried to add a document
>
> FileDocumentHolder holder = new FileDocumentHolder();
>        holder.setCategory("Categoria nueva");
>        holder.setFilename("test");
>        holder.setId("555");
>        holder.setFile(bs);
>
>
>        getIndexAccessorService().addDocument(holder);
>
> and have the following exception
>
>> indexFactory =
> org.springmodules.lucene.index.factory.concurrent.lockindexfact...@40979b
>> reader =
> org.springmodules.lucene.index.factory.simpleluceneindexrea...@184de18
> Indice purgado
> org.springmodules.lucene.index.DocumentHandlerException: No document handler
> defined for the name test
>    at
> org.springmodules.lucene.index.document.handler.DefaultDocumentHandlerManager.getDocumentHandler(DefaultDocumentHandlerManager.java:75)
>    at
> org.springmodules.lucene.index.core.InputStreamDocumentCreatorWithManager.createDocumentFromInputStream(InputStreamDocumentCreatorWithManager.java:109)
>    at
> org.springmodules.lucene.index.core.DefaultLuceneIndexTemplate.addDocument(DefaultLuceneIndexTemplate.java:273)
>    at
> org.springmodules.lucene.index.core.DefaultLuceneIndexTemplate.addDocument(DefaultLuceneIndexTemplate.java:265)
>    at
> es.xunta.cptopt.framework.lucene.dao.impl.IndexAccessorDaoImpl.addDocument(IndexAccessorDaoImpl.java:72)
>    at
> es.xunta.cptopt.framework.lucene.service.impl.IndexAccessorServiceImpl.addDocument(IndexAccessorServiceImpl.java:77)
>    at
> es.xunta.cptopt.framework.webadmin.view.impl.modules.BBModule.executeSearch(BBModule.java:184)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>    at java.lang.reflect.Method.invoke(Unknown Source)
>
>
> I have defined my context as
>
> <bean id="documentHandlerManager"
> class="org.springmodules.lucene.index.document.handler.DocumentHandlerManagerFactoryBean">
>        <property name="documentHandlerManagerClass"
> value="org.springmodules.lucene.index.document.handler.file.ExtensionDocumentHandlerManager"/>
>        <property name="documentMatchingClass"
> value="org.springmodules.lucene.index.document.handler.file.ExtensionDocumentMatching"/>
>    </bean>
>
>    <bean id="indexAccessorDao"
> class="es.xunta.cptopt.framework.lucene.dao.impl.IndexAccessorDaoImpl">
>        <property name="indexFactory" ref="indexFactory"/>
>        <property name="documentHandlerManager"
> ref="documentHandlerManager"/>
>    </bean>
>
>    <bean id="documentIdDao"
> class="es.xunta.cptopt.framework.lucene.dao.impl.DocumentIdDaoImpl">
>        <property name="dataSource" ref="dataSource"/>
>    </bean>
>
>    <bean id="indexAccessorService"
> class="es.xunta.cptopt.framework.lucene.service.impl.IndexAccessorServiceImpl">
>        <property name="documentIdDao" ref="documentIdDao"/>
>        <property name="indexAccessorDao" ref="indexAccessorDao"/>
>    </bean>
>
>
> Could anyone help me?
>
>
> Thanks
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to