You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Luis zorita <lz...@pas.uned.es> on 2004/09/04 13:56:11 UTC
ConfigurableIndexer xml
Hi again with lucene in windows:
Now the defaultindexer works fine with html docs.
But in lenya file are xml docs so I tried to use the ConfigurableIndexer
as I read in documentation.
So my lucene is :
<lucene>
<update-index type="new"/>
<!--<update-index type="incremental"/>-->
<index-dir
src="\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\index\authoring\index"/>
<htdocs-dump-dir
src="\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\htdocs_dump\authoring"/>
<!-- ConfigurableIndexer for xml docs-->
<indexer class="org.apache.lenya.lucene.index.ConfigurableIndexer">
<configuration
src="\lenyaprueba\build\lenya\webapp\lenya\pubs\default\config\search\cmfs-lucenedoc.xconf"/>
<extensions src="xml"/>
</indexer>
<!--default indexer for html docs-->
<!--<indexer class="org.apache.lenya.lucene.index.DefaultIndexer"/>-->
</lucene>
where cmfs-lucenedoc.xconf is:
<luc:document xmlns:luc="http://apache.org/cocoon/lenya/lucene/1.0">
<luc:field name="title" type="UnStored"/>
<namespace
prefix="lenya">http://apache.org/cocoon/lenya/page-envelope/1.0</namespace>
<namespace prefix="dc">http://purl.org/dc/elements/1.1/</namespace>
<xpath>/*/lenya:meta/dc:title</xpath>
</luc:field>
</luc:document>
Runnig:
ant -f d:\lenyaprueba\build\lenya\webapp\lenya\bin\crawl_and_index.xml
-Dlucene.xconf=d:\lenyaprueba\build\lenya\webapp\lenya\pubs\default\config\search\lucene-authoring.xconf
index
and (actually it doesn´t matter the cmfs-lucenedoc.xconf I have) the
error I get always is:
D:\lenyaprueba\build\lenya\webapp>ant -f
d:\lenyaprueba\build\lenya\webapp\lenya\bin\crawl_and_index.xml
-Dlucene.xconf=d:\lenyaprueba\build\lenya\webapp\lenya\pubs\default\config\search\lucene-authoring.xconf
index
Buildfile: d:\lenyaprueba\build\lenya\webapp\lenya\bin\crawl_and_index.xml
init:
[echo] INFO: Init
index:
[echo] INFO: Index hypertext documents
[echo] INFO: Show configuration
[java] Index type: new
[java] Index dir:
\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\index\authoring\index
[java] Index dir (resolved):
\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\index\authoring\index
[java] htdocs_dump:
\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\htdocs_dump\authoring
[java] htdocs_dump (resolved):
\lenyaprueba\build\lenya\webapp\lenya\pubs\default\work\search\lucene\htdocs_dump\authoring
[java] Indexer class: class
org.apache.lenya.lucene.index.ConfigurableIndexer
[echo] INFO: Create index ...
[java] java.lang.IllegalArgumentException: URI is not hierarchical
[java] at java.io.File.<init>(File.java:321)
[java] at
org.apache.lenya.lucene.index.ConfigurableIndexer.getStylesheet(ConfigurableIndexer.java:73)
[java] at
org.apache.lenya.lucene.index.ConfigurableIndexer.createDocumentCreator(ConfigurableIndexer.java:60)
[java] at
org.apache.lenya.lucene.index.AbstractIndexer.configure(AbstractIndexer.java:66)
[java] at org.apache.lenya.lucene.index.Index.main(Index.java:73)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:196)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:133)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:661)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:168)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:301)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[java] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:632)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:183)
[java] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[java] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
[echo] INFO: Index has been created
BUILD SUCCESSFUL
Total time: 6 seconds
Any idea about : java.lang.IllegalArgumentException: URI is not hierarchical
Thanks
Luis
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org