I tried to replicate your search scenario using the code below: Indexer ind = new Indexer(); IndexWriter indW; List<String> listData = new LinkedList<>(); listData.add("Name:PeterRooney"); indW = ind.CreateIndexDir(listData); ind.indexDocs(indW, listData); ind.closeWriter(indW);
SearchEngine sEng = new SearchEngine("PeterRooney"); And the console prints PeterRooney. Therefore, your problem is coming from the *for* loop logic. There are three possible reasons. First, listaIndividuos's size is 0. The loop is never executed. Second, listaIndividuos.get(i) returns empty lists. Third, you have many objects that get indexed. However, because you have set *create=true* in the *indexDocs* method, you always delete the old index and build a new one causing the removal of old data. Therefore, You query was getting no results. Would mind to share the content of listaIndividuos and ontM.getInfo(listaIndividuos.get(i))? It will be good to have a sample of your documents. Regards Ameer -- View this message in context: http://lucene.472066.n3.nabble.com/Doubt-Lucene-tp4159068p4159521.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org