Lucene search result -
i have below data index in lucene 4.8 , code. finance expense admin expenses transaction expense salary expenses indexing: try { writer = createwriter(ramdirectory); for(string line : readfile(file_path)) { string[] split = line.split(","); document doc = new document(); doc.add(new textfield("id", split[0].trim(), field.store.yes)); doc.add(new textfield("name", split[1].trim(), field.store.yes)); writer.adddocument(doc); } writer.commit(); } { if(writer != null) { writer.close(); } } search indexsearcher searcher = new indexsearcher(directoryreader.open(ramdirectory)); queryparser nameqparser = new queryparser(version.lucene_48, "name", new standardanalyzer(version.lucene_48)); query query = nameqparser.parse("expense"); topdocs queryresults = searcher.search(query, 10); above c