public class WikiIndex extends Object
Modifier and Type | Field and Description |
---|---|
static String |
defaultIndexPath |
static int |
defaultMaxHits |
static String |
defaultSearchField |
Constructor and Description |
---|
WikiIndex() |
WikiIndex(int maxHits,
String indexPath,
String searchField) |
WikiIndex(int maxHits,
String indexPath,
String searchField,
boolean approximate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
double |
getCosineSimilarity(String queryText1,
String queryText2)
Send two queries to the index.
|
ArrayList<org.apache.lucene.index.Terms> |
getTermFreqVectors(String queryString) |
void |
initialize() |
ArrayList<SearchResult> |
search(String queryText)
Search the index.
|
public static int defaultMaxHits
public static String defaultIndexPath
public static String defaultSearchField
public void initialize() throws org.apache.lucene.index.CorruptIndexException, IOException
org.apache.lucene.index.CorruptIndexException
IOException
public ArrayList<SearchResult> search(String queryText) throws org.apache.lucene.queryparser.classic.ParseException, IOException
org.apache.lucene.queryparser.classic.ParseException
IOException
public double getCosineSimilarity(String queryText1, String queryText2) throws org.apache.lucene.queryparser.classic.ParseException, IOException
org.apache.lucene.queryparser.classic.ParseException
IOException
public ArrayList<org.apache.lucene.index.Terms> getTermFreqVectors(String queryString) throws org.apache.lucene.queryparser.classic.ParseException, IOException
org.apache.lucene.queryparser.classic.ParseException
IOException
public void close() throws IOException
IOException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.