searcher = new IndexSearcher(IndexReader.open(directory));
Analyzer analyzer = DocumentCreator.createDocumentAnalyzer();
QueryParser parser = new QueryParser(DocumentCreator.FIELD_TEXT,analyzer);
TermQuery matchUserQuery = new TermQuery(new Term(DocumentCreator.FIELD_USER,username));
Query inputQuery = parser.parse(query);
BooleanQuery boolQuery = new BooleanQuery();
boolQuery.add(matchUserQuery, BooleanClause.Occur.MUST);
boolQuery.add(inputQuery,BooleanClause.Occur.MUST);
Hits hits = searcher.search(boolQuery);