> I want to retrieve
> a single faq using a search engine.
You could index FAQs instead of files.
for file in listFiles():
for faq in extractFaqs(file):
doc = Document()
doc.add(Field.Keyword('key', faq.id))
doc.add(Field.Keyword('file', file))
doc.add(Field.Unstored('content', faq.content))
writer.addDocument(doc)
> I didn't see anything like this in the docs....just something that
> return the number of hits of a search
One solution would be to create a custom HitCollector that simply counts
hits and then 'searcher.search(query, hitCollector)'.
--
Eric Jain
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]