lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Jain" <>
Subject Re: Can I do this with Lucene ?
Date Thu, 10 Jul 2003 10:20:59 GMT
> 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('file', file))
      doc.add(Field.Unstored('content', faq.content))

> 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 ', hitCollector)'.

Eric Jain

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

View raw message