Re: Searching through a single XML document

2008-04-20 Thread Ulf Dittmer
The search can't return more than one document, because only a single document is ever added to the index. You might want to think about structuring the index differently, e.g. by creating one Document for each SPEECH element. The search for "the" in particular won't find anything, because that's

Searching through a single XML document

2008-04-20 Thread syedfa
tDirectory(indexDir); IndexSearcher is=new IndexSearcher(fsDir); Query parser=new QueryParser("SPEAKER", new StandardAnalyzer()).parse(q); long start=new Date().getTime(); Hits hits=is.search(parser); long end=new Date().getTime(); System.err.print