You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de> on 2008/10/13 11:45:27 UTC
Re: Need help with DictionaryCompoundWordTokenFilterFactory
Thx a lot !
I downloaded a dictionary called "de_DR.xml" and put it into my "conf"
directory...
Then I changed my schema.xml to :
class="solr.DictionaryCompoundWordTokenFilterFactory"
dictFile="./conf/de_DR.xml"
minWordSize="5"
minSubwordSize="2"
maxSubwordSize="15"
onlyLongestMatch="true"
but solr can´t find the dictionary file :-(
SCHWERWIEGEND: Could not start SOLR. Check solr/home property
java.lang.RuntimeException: Error opening null
at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:191)
at
org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:237)
at
org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:213)
at
org.apache.solr.analysis.DictionaryCompoundWordTokenFilterFactory.inform(DictionaryCompoundWordTokenFilterFactory.java:49)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:322)
Any hints ?
Greets -Ralf-
Re: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de>.
Chris Hostetter schrieb:
> : : dictFile="de_DR.xml"
> :
> : according to the code the param name is "dictionary" not dictFile.
>
> PS: the dictionary file shouldn't be and XML file, it should look just
> like a stopwords file (one word per line)
>
>
> -Hoss
>
>
thx !!!!!
It finally runs perfect !
Greets -Ralf-
RE: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by Chris Hostetter <ho...@fucit.org>.
: : dictFile="de_DR.xml"
:
: according to the code the param name is "dictionary" not dictFile.
PS: the dictionary file shouldn't be and XML file, it should look just
like a stopwords file (one word per line)
-Hoss
RE: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by Steven A Rowe <sa...@syr.edu>.
Hi Ralf,
On 10/14/2008 at 9:35 AM, Kraus, Ralf | pixelhouse GmbH wrote:
> Steven A Rowe schrieb:
> > Oops, variable-name != attribute-name.
> >
> > Thanks Hoss.
> >
> > Steve
> So ....
>
> "dictFile" or "dictionary" ???
Sorry, didn't mean to muddy the water.
Hoss is correct. I misread the source code. "dictionary" is the correct attribute name, not "dictFile".
Steve
Re: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de>.
Steven A Rowe schrieb:
> Oops, variable-name != attribute-name.
>
> Thanks Hoss.
>
> Steve
So ....
"dictFile" or "dictionary" ???
Greets -Ralf-
RE: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by Steven A Rowe <sa...@syr.edu>.
Oops, variable-name != attribute-name.
Thanks Hoss.
Steve
On 10/14/2008 at 1:12 AM, Chris Hostetter wrote:
>
> > Try using the name of the file without a path - I believe
> the conf/ directory is in the search path used by Solr when
> loading resources, i.e.:
> >
> > dictFile="de_DR.xml"
>
> according to the code the param name is "dictionary" not dictFile.
>
> I'll add a better error message.
>
> -Hoss
>
>
RE: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by Chris Hostetter <ho...@fucit.org>.
: Try using the name of the file without a path - I believe the conf/ directory is in the search path used by Solr when loading resources, i.e.:
:
: dictFile="de_DR.xml"
according to the code the param name is "dictionary" not dictFile.
I'll add a better error message.
-Hoss
RE: Need help with DictionaryCompoundWordTokenFilterFactory
Posted by Steven A Rowe <sa...@syr.edu>.
Hi Ralf,
On 10/13/2008 at 5:45 AM, Kraus, Ralf | pixelhouse GmbH wrote:
> but solr can´t find the dictionary file :-(
Try using the name of the file without a path - I believe the conf/ directory is in the search path used by Solr when loading resources, i.e.:
dictFile="de_DR.xml"
As an alternative, you should definitely be able to give an absolute path to the dictionary file.
Steve