com.elasticpath.persistence.impl
Class SpellIndexSearcherImpl

java.lang.Object
  extended by com.elasticpath.persistence.impl.SpellIndexSearcherImpl
All Implemented Interfaces:
SpellIndexSearcher

public class SpellIndexSearcherImpl
extends java.lang.Object
implements SpellIndexSearcher

A Lucene-based implementation of SpellIndexSearcher.


Constructor Summary
SpellIndexSearcherImpl()
           
 
Method Summary
 ElasticPath getElasticPath()
          Gets the ElasticPath instance.
 void setElasticPath(ElasticPath elasticPath)
          Set the ElasticPath instance.
 java.lang.String[] suggest(java.lang.String spellIndexDir, java.lang.String sourceIndexDir, java.lang.String field, java.lang.String query, java.util.Locale locale)
          Generates a list of alternate queries that are similar to the supplied query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpellIndexSearcherImpl

public SpellIndexSearcherImpl()
Method Detail

getElasticPath

public ElasticPath getElasticPath()
Gets the ElasticPath instance.

Returns:
the ElasticPath instance

setElasticPath

public void setElasticPath(ElasticPath elasticPath)
Set the ElasticPath instance.

Parameters:
elasticPath - the instance of ElasticPath

suggest

public java.lang.String[] suggest(java.lang.String spellIndexDir,
                                  java.lang.String sourceIndexDir,
                                  java.lang.String field,
                                  java.lang.String query,
                                  java.util.Locale locale)
Generates a list of alternate queries that are similar to the supplied query.

Specified by:
suggest in interface SpellIndexSearcher
Parameters:
spellIndexDir - the directory of the spelling index
sourceIndexDir - the directory of the source index
field - the field of the source index
query - the original query
locale - the locale to use to search
Returns:
the list of alternate queries