LuceneHelper { public Article getArticle(int id) { Article a = new Article(); a.setWikiId(id); Document d = getDoc(id); if (d != null) { List<String> paragraphs = new ArrayList<String>(); paragraphs.add(d.getField(LUCENE_ARTICLE_CONTENT).stringValue()); a.setTitle(d.getField(LUCENE_ARTICLE_TITLE).stringValue()); a.setWikiTitle(d.getField(LUCENE_ARTICLE_WIKI_TITLE).stringValue()); a.setSummary(d.getField(LUCENE_ARTICLE_SUMMARY).stringValue()); a.setParagraphs(paragraphs); } return a; } protected  LuceneHelper(File wikiIdtToLuceneIdSerialization, File indexPath); static boolean hasDexterLuceneIndex(); static LuceneHelper getDexterLuceneHelper(); @SuppressWarnings("unchecked") void loadWikiIdToLuceneId(); float getSimilarity(Query query, int wikiId); double getCosineSimilarity(int x, int y); double getCosineSimilarity(int x, int y, String field); void addDocument(Article a); void clearIndex(); void commit(); int getFreq(String query, String field); int getFreq(String query); int getFreqFromSummary(String query); int numDocs(); void closeWriter(); List<Integer> query(String query, String field, int n); List<Integer> query(String query, String field); List<Integer> query(String query); Article getArticle(int id); Article getArticleSummary(int id); int getWikiId(int luceneId); @SuppressWarnings("null") void rankBySimilarity(SpotMatch spot, EntityMatchList eml,
			String context, String field); void rankBySimilarity(SpotMatch spot, EntityMatchList eml,
			String context);  }
@Test public void testGetArticle() { assertEquals("diego ceccarelli test test1 test2 and", helper .getArticle(1).getText().trim()); assertEquals("ceccarelli test test1 test2 and", helper.getArticle(2) .getText().trim()); assertEquals("pippo pippo pippo pippos", helper.getArticle(6).getText() .trim()); }