@Produces(MediaType.APPLICATION_JSON)
public List<SearchResult> search(SearchAPIQuery query){
try {
Query q = new QueryParser(TweetStreamIndexer.StatusField.TEXT.name, TweetSearcher.ANALYZER).parse(query.getQuery());
try {
<BUG>reader = DirectoryReader.open(TweetSearcher.indexWriter, true);
</BUG>
} catch (IOException e) {
e.printStackTrace();
}

@Produces(MediaType.APPLICATION_JSON)
public List<SearchResult> search(SearchAPIQuery query){
try {
Query q = new QueryParser(TweetStreamIndexer.StatusField.TEXT.name, TweetSearcher.ANALYZER).parse(query.getQuery());
try {
reader = DirectoryReader.open(TweetSearcher.indexWriter, true, true);
} catch (IOException e) {
e.printStackTrace();
}
