Package org.apache.nutch.spell

Examples of org.apache.nutch.spell.SpellCheckerTerms


  public void nutchPerform(ComponentContext tileContext,
      HttpServletRequest request, HttpServletResponse response,
      ServletContext servletContext) throws ServletException, IOException {
    ServiceLocator serviceLocator=getServiceLocator(request);

    SpellCheckerTerms spellCheckerTerms = null;
    if (spellCheckerBean != null) {
            spellCheckerTerms = spellCheckerBean.checkSpelling(serviceLocator.getSearch().getQuery(), serviceLocator.getSearch().getQueryString());
    }

    SearchForm form=(SearchForm)serviceLocator.getSearchForm().clone();
    form.setValue(SearchForm.NAME_QUERYSTRING,spellCheckerTerms.getSpellCheckedQuery());
    String spellQuery = form.getParameterString("utf-8");
   
    request.setAttribute(ATTR_SPELL_TERMS, spellCheckerTerms);
    request.setAttribute(ATTR_SPELL_QUERY, spellQuery);
  }
View Full Code Here

TOP

Related Classes of org.apache.nutch.spell.SpellCheckerTerms

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.