You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Paco Avila <mo...@gmail.com> on 2008/08/05 09:17:33 UTC

Configuring analyzer for property with namespace

I'm trying to configure a different analyzer for one custom property but a
exception is thrown because the property is defined with a namespace:

javax.jcr.NamespaceException: Unknown namespace prefix okm.

This is the indexing configuration used:

<?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "
http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
  <analyzers>
        <analyzer class="org.apache.lucene.analysis.SimpleAnalyzer">
            <property>okm:name</property>
        </analyzer>
  </analyzers>
</configuration>

How can I do it?

Re: Configuring analyzer for property with namespace

Posted by Paco Avila <mo...@gmail.com>.
Yea! Thanks!

On Tue, Aug 5, 2008 at 9:35 AM, Ard Schrijvers <a....@onehippo.com>wrote:

> Hello Paco,
>
> IIRC, you only need to add it the the configuration element, so instead
> of
> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
>
> You get
>
> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
>                 xmlns:okm="http://your-used-namespace">
>
> Make sure your-used-namespace matches your okm namespace. Is this
> information not present on [1] ?
>
> Regards Ard
>
> [1] http://wiki.apache.org/jackrabbit/IndexingConfiguration
>
> >
> > I'm trying to configure a different analyzer for one custom
> > property but a exception is thrown because the property is
> > defined with a namespace:
> >
> > javax.jcr.NamespaceException: Unknown namespace prefix okm.
> >
> > This is the indexing configuration used:
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE configuration SYSTEM "
> > http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
> > <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
> >   <analyzers>
> >         <analyzer class="org.apache.lucene.analysis.SimpleAnalyzer">
> >             <property>okm:name</property>
> >         </analyzer>
> >   </analyzers>
> > </configuration>
> >
> > How can I do it?
> >
>

RE: Configuring analyzer for property with namespace

Posted by Ard Schrijvers <a....@onehippo.com>.
Hello Paco,

IIRC, you only need to add it the the configuration element, so instead
of 
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">

You get

<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
		xmlns:okm="http://your-used-namespace">

Make sure your-used-namespace matches your okm namespace. Is this
information not present on [1] ?

Regards Ard

[1] http://wiki.apache.org/jackrabbit/IndexingConfiguration

> 
> I'm trying to configure a different analyzer for one custom 
> property but a exception is thrown because the property is 
> defined with a namespace:
> 
> javax.jcr.NamespaceException: Unknown namespace prefix okm.
> 
> This is the indexing configuration used:
> 
> <?xml version="1.0"?>
> <!DOCTYPE configuration SYSTEM "
> http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
>   <analyzers>
>         <analyzer class="org.apache.lucene.analysis.SimpleAnalyzer">
>             <property>okm:name</property>
>         </analyzer>
>   </analyzers>
> </configuration>
> 
> How can I do it?
>