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 Amitesh Tiwari <am...@gic.com.sg> on 2016/11/11 02:11:54 UTC

FileDictionaryFactory : sourceLocation entry error

Hi Team,

I am implementing below suggester for some admin controlled suggested words.

<lst name="suggester">
      <str name="name">adminSuggester</str>
      <str name="lookupImpl">FuzzyLookupFactory</str>
      <str name="dictionaryImpl">FileDictionaryFactory</str>
      <str name="sourceLocation">C:\\Project\\adminAuto.txt</str>
      <str name="fieldDelimiter">,</str>
      <str name="suggestAnalyzerFieldType">suggestXYZField</str>
      <str name="buildOnStartup">false</str>
    </lst>

Problem is, what's the way to locate the file ?
<str name="sourceLocation">C:\\Project\adminAuto.txt</str> and where to place this.

Above entry is showing error.
org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'C:\\Project\adminAuto.txt' in classpath or '/configs/test2_signals_aggr', cwd=C:\Project\Prog\fusion


Regards,
Amitesh.

This email from GIC may contain confidential information.  Unauthorised communication and disclosure of any information in this email is prohibited.   If you are not the intended recipient, please notify the sender and delete this email immediately.

Re: FileDictionaryFactory : sourceLocation entry error

Posted by Erick Erickson <er...@gmail.com>.
You have a double backslash in your definition between Project\\admin,
although that may be a typo.

Two things:
1> try forward slashes instead. Java likes those.
2> this looks like the Lucidworks app (fusion), you may have to ask on
their forum.

Best,
Erick

On Thu, Nov 10, 2016 at 6:11 PM, Amitesh Tiwari
<am...@gic.com.sg> wrote:
> Hi Team,
>
> I am implementing below suggester for some admin controlled suggested words.
>
> <lst name="suggester">
>       <str name="name">adminSuggester</str>
>       <str name="lookupImpl">FuzzyLookupFactory</str>
>       <str name="dictionaryImpl">FileDictionaryFactory</str>
>       <str name="sourceLocation">C:\\Project\\adminAuto.txt</str>
>       <str name="fieldDelimiter">,</str>
>       <str name="suggestAnalyzerFieldType">suggestXYZField</str>
>       <str name="buildOnStartup">false</str>
>     </lst>
>
> Problem is, what's the way to locate the file ?
> <str name="sourceLocation">C:\\Project\adminAuto.txt</str> and where to place this.
>
> Above entry is showing error.
> org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'C:\\Project\adminAuto.txt' in classpath or '/configs/test2_signals_aggr', cwd=C:\Project\Prog\fusion
>
>
> Regards,
> Amitesh.
>
> This email from GIC may contain confidential information.  Unauthorised communication and disclosure of any information in this email is prohibited.   If you are not the intended recipient, please notify the sender and delete this email immediately.