You should add this component (suggest or spellcheck, depends how do
you name it) to request handler, i.e. add

  <requestHandler name="/suggest"
class="org.apache.solr.handler.component.SearchHandler">
    <lst name="defaults">
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler>

And then you can hit the following url and get your suggestions

http://localhost:8983/solr/suggest/?spellcheck=true&spellcheck.dictionary=suggest&spellcheck.build=true&spellcheck.extendedResults=true&spellcheck.count=10&q=prefix

On Wed, Mar 24, 2010 at 8:09 PM, stocki <st...@shopgate.com> wrote:
>
> hey.
>
> i got it =)
>
> i checked out with lucene and the build from solr. with ant -verbose
> example.
>
> now, when i put this line into solrconfig: <str
> name="classname">org.apache.solr.spelling.suggest.Suggester</str>
> no exception occurs =) juhu....
>
> but how wokrs this component ?? sorry for a new stupid question ^^
>
>
> stocki wrote:
>>
>> okay, thx
>>
>> so i checked out but i cannot build an build.
>>
>> i got 100 errors ...
>>
>> D:\cygwin\home\stock\trunk_\solr\common-build.xml:424: The following error
>> occur
>> red while executing this line:
>> D:\cygwin\home\stock\trunk_\solr\common-build.xml:281: The following error
>> occur
>> red while executing this line:
>> D:\cygwin\home\stock\trunk_\solr\contrib\clustering\build.xml:69: The
>> following
>> error occurred while executing this line:
>> D:\cygwin\home\stock\trunk_\solr\build.xml:155: The following error
>> occurred whi
>> le executing this line:
>> D:\cygwin\home\stock\trunk_\solr\common-build.xml:221: Compile failed; see
>> the c
>> ompiler error output for details.
>>
>>
>>
>> Lance Norskog-2 wrote:
>>>
>>> You need 'ant' to do builds.  At the top level, do:
>>> ant clean
>>> ant example
>>>
>>> These will build everything and set up the example/ directory. After
>>> that, run:
>>> ant test-core
>>>
>>> to run all of the unit tests and make sure that the build works. If
>>> the autosuggest patch has a test, this will check that the patch went
>>> in correctly.
>>>
>>> Lance
>>>
>>> On Tue, Mar 23, 2010 at 7:42 AM, stocki <st...@shopgate.com> wrote:
>>>>
>>>> okay,
>>>> i do this..
>>>>
>>>> but one file are not right updatet ....
>>>> Index: trunk/src/java/org/apache/solr/util/HighFrequencyDictionary.java
>>>> (from the suggest.patch)
>>>>
>>>> i checkout it from eclipse, apply patch, make an new solr.war ... its
>>>> the
>>>> right way ??
>>>> i thought that is making a war i didnt need to make an build.
>>>>
>>>> how do i make an build ?
>>>>
>>>>
>>>>
>>>>
>>>> Alexey-34 wrote:
>>>>>
>>>>>> Error loading class 'org.apache.solr.spelling.suggest.Suggester'
>>>>> Are you sure you applied the patch correctly?
>>>>> See http://wiki.apache.org/solr/HowToContribute#Working_With_Patches
>>>>>
>>>>> Checkout Solr trunk source code (
>>>>> http://svn.apache.org/repos/asf/lucene/solr/trunk ), apply patch,
>>>>> verify that everything went smoothly, build solr and use built version
>>>>> for your tests.
>>>>>
>>>>> On Mon, Mar 22, 2010 at 9:42 PM, stocki <st...@shopgate.com> wrote:
>>>>>>
>>>>>> i patch an nightly build from solr.
>>>>>> patch runs, classes are in the correct folder, but when i replace
>>>>>> spellcheck
>>>>>> with this spellchecl like in the comments, solr cannot find the
>>>>>> classes
>>>>>> =(
>>>>>>
>>>>>> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>>>>>>    <lst name="spellchecker">
>>>>>>      <str name="name">suggest</str>
>>>>>>      <str
>>>>>> name="classname">org.apache.solr.spelling.suggest.Suggester</str>
>>>>>>      <str
>>>>>> name="lookupImpl">org.apache.solr.spelling.suggest.jaspell.JaspellLookup</str>
>>>>>>      <str name="field">text</str>
>>>>>>      <str name="sourceLocation">american-english</str>
>>>>>>    </lst>
>>>>>>  </searchComponent>
>>>>>>
>>>>>>
>>>>>> --> SCHWERWIEGEND: org.apache.solr.common.SolrException: Error loading
>>>>>> class
>>>>>> 'org.ap
>>>>>> ache.solr.spelling.suggest.Suggester'
>>>>>>
>>>>>>
>>>>>> why is it so ??????  i think no one has so many trouble to run a patch
>>>>>> like
>>>>>> me =( :D
>>>>>>
>>>>>>
>>>>>> Andrzej Bialecki wrote:
>>>>>>>
>>>>>>> On 2010-03-19 13:03, stocki wrote:
>>>>>>>>
>>>>>>>> hello..
>>>>>>>>
>>>>>>>> i try to implement autosuggest component from these link:
>>>>>>>> http://issues.apache.org/jira/browse/SOLR-1316
>>>>>>>>
>>>>>>>> but i have no idea how to do this !?? can anyone get me some tipps ?
>>>>>>>
>>>>>>> Please follow the instructions outlined in the JIRA issue, in the
>>>>>>> comment that shows fragments of XML config files.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Andrzej Bialecki     <><
>>>>>>>   ___. ___ ___ ___ _ _   __________________________________
>>>>>>> [__ || __|__/|__||\/|  Information Retrieval, Semantic Web
>>>>>>> ___|||__||  \|  ||  |  Embedded Unix, System Integration
>>>>>>> http://www.sigram.com  Contact: info at sigram dot com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/SOLR-1316-How-To-Implement-this-autosuggest-component-----tp27950949p27990809.html
>>>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/SOLR-1316-How-To-Implement-this-patch-----autoComplete-tp27950949p28001938.html
>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Lance Norskog
>>> goks...@gmail.com
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/SOLR-1316-How-To-Implement-this-patch-----autoComplete-tp27950949p28018196.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to