lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atawfik <>
Subject Re: Doubt Lucene
Date Wed, 17 Sep 2014 19:56:21 GMT
I tried to replicate your search scenario using the code below:

                Indexer ind = new Indexer();
		IndexWriter indW;
		List<String> listData = new LinkedList<>();
		indW = ind.CreateIndexDir(listData);
		ind.indexDocs(indW, listData);

		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

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.


View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message