@TestInfo(testType=SYSTEM)
public void testCaretQueries() throws InterruptedException, ParseException, Exception {
DocumentSearcher searcher = this.indexEngine.getSearcher();
BoostingIndexer indexer = this.indexEngine.getIndexer();
indexer.addScoreFunction(1, "relevance");
Document doc;
Query query;
doc = new Document(ImmutableMap.of("text", "aaa"));
indexer.add("1", doc, 0, ImmutableMap.<Integer, Double>of());
doc = new Document(ImmutableMap.of("text", "aaa bbb"));
indexer.add("2", doc, 0, ImmutableMap.<Integer, Double>of());
doc = new Document(ImmutableMap.of("text", "aaa aaa bbb"));
indexer.add("3", doc, 0, ImmutableMap.<Integer, Double>of());
doc = new Document(ImmutableMap.of("text", "aaa bbb ccc eee"));
indexer.add("4", doc, 0, ImmutableMap.<Integer, Double>of());
doc = new Document(ImmutableMap.of("text", "ccc ddd"));
indexer.add("5", doc, 0, ImmutableMap.<Integer, Double>of());
query = new Query(indexEngine.getParser().parseQuery("aaa"),null,null);
checkResults("Caret", searcher, query, 1, new String[] {"1","3","2","4"});