Re: Searching for instances within a document

2008-07-11 Thread Karl Wettin
11 jul 2008 kl. 15.28 skrev jnance: The TermFrequencyVector works perfectly for normal query strings. But if I add a wild card (*) onto words to search for different forms of the word I get an ArrayIndexOutOfBoundsException because the index is -1. Why does this happen? And is there anyw

Re: Searching for instances within a document

2008-07-11 Thread jnance
ot;, new >>>> StandardAnalyzer()); >>>> Query query = parser.parse(queryString); >>>> Hits hits = searcher.search(query); >>>> >>>> int hitCount = hits.length(); >>>>

Re: Searching for instances within a document

2008-07-10 Thread jnance
t; System.out.println("0 documents contain the word >>> \"" + queryString + >>> ".\""); >>> } >>> else { >>> System

Re: Searching for instances within a document

2008-07-10 Thread Ajay Lakhani
gt; } >> else { >> System.out.println(hitCount + " documents contain >> the word \"" + >> queryString + ".\""); >> } >> } >> >> This tells me how

Re: Searching for instances within a document

2008-07-09 Thread Karl Wettin
+ " documents contain the word \"" + queryString + ".\""); } } This tells me how many documents contain the word I'm looking for... but how do I get it to tell me how many times the word occurs within that document? Thanks, James --

Re: Searching for instances within a document

2008-07-09 Thread jnance
Ok, I'll see if I can find anything. Thanks, James -- View this message in context: http://www.nabble.com/Searching-for-instances-within-a-document-tp18362075p18362432.html Sent from the Lucene - Java Users mailing list archive at Nabbl

Re: Searching for instances within a document

2008-07-09 Thread Erick Erickson
d \"" + > queryString + ".\""); > } > } > > This tells me how many documents contain the word I'm looking for... but > how > do I get it to tell me how many times the word occurs within that document? > > Thanks,

Searching for instances within a document

2008-07-09 Thread jnance
t;); } } This tells me how many documents contain the word I'm looking for... but how do I get it to tell me how many times the word occurs within that document? Thanks, James -- View this message in context: http://www.nabble.com/Searching-for-instances-with