lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abu Abdulla <>
Subject Re: Strange output
Date Mon, 16 Feb 2009 07:51:49 GMT

I'm using this for searching (extracted and not full code):

IndexSearcher indexSearcher = new IndexSearcher("index");

final QueryParser queryParser = new QueryParser("Line", myAnalyzer);
final Query query = queryParser.parse(searchText);

final BitSet bits = new BitSet(indexSearcher.maxDoc());, new HitCollector(){public void collect(int doc,
float score){bits.set(doc);}});

for(int j=0; j<bits.length() ; j++)
		final Document doc = indexSearcher.doc(j);

for indexing:

final IndexWriter indexWriter = new IndexWriter("index", myAnalyzer, true,
new IndexWriter.MaxFieldLength(1500));

	final Document doc = new Document();
	doc.add(new Field("name", rs.getString("name"), Field.Store.YES,
	doc.add(new Field("Line" , rs.getString("Line"), Field.Store.YES,


it happens only sometimes.


Erick Erickson wrote:
> You need to provide more context for your question, as
> it is it's unanswerable.
> What are you doing when you get this message? What are
> you trying to do? What is your setup? Code fragments
> would be useful for both your indexing and searching.

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