org.languagetool.dev.index
Class Searcher

java.lang.Object
  extended by org.languagetool.dev.index.Searcher

public class Searcher
extends Object

A class with a main() method that takes a rule id and the location of the index that runs the query on that index and prints all matches. Will transparently handle rules that are not supported, i.e. run on the candidate matches up to a limit.

Author:
Tao Lin, Daniel Naber

Constructor Summary
Searcher(org.apache.lucene.store.Directory directory)
           
 
Method Summary
 SearcherResult findRuleMatchesOnIndex(PatternRule rule, Language language)
           
 int getDocCount()
           
 int getMaxHits()
           
 int getMaxSearchTimeMillis()
           
static void main(String[] args)
           
 void setMaxHits(int maxHits)
           
 void setMaxSearchTimeMillis(int maxSearchTimeMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Searcher

public Searcher(org.apache.lucene.store.Directory directory)
         throws IOException
Throws:
IOException
Method Detail

getDocCount

public int getDocCount()
                throws IOException
Throws:
IOException

getMaxHits

public int getMaxHits()

setMaxHits

public void setMaxHits(int maxHits)

getMaxSearchTimeMillis

public int getMaxSearchTimeMillis()

setMaxSearchTimeMillis

public void setMaxSearchTimeMillis(int maxSearchTimeMillis)

findRuleMatchesOnIndex

public SearcherResult findRuleMatchesOnIndex(PatternRule rule,
                                             Language language)
                                      throws IOException,
                                             UnsupportedPatternRuleException
Throws:
IOException
UnsupportedPatternRuleException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2013. All Rights Reserved.