You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by zaq <b1...@klzlk.com> on 2011/05/17 23:41:09 UTC

searching for finiite keyword matches

Hi all,

I've been trying to figure out the best way to search a document for a set
of given keywords. In other words, I have a defined set of keywords I want
to match and a document within which to search for those keywords. I also
need to know which of the keywords match and not just whether any did.
Certainly, the simplest way seems to just run a query for each keyword
against the index that the doc is in. But seems rather crude and if the list
of keywords gets large, would be a nasty performance problem.

Can't figure out any more clever and/or efficient way to go about it. Any
suggestions?

Cheers,
Zaq

--
View this message in context: http://lucene.472066.n3.nabble.com/searching-for-finiite-keyword-matches-tp2954451p2954451.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: searching for finiite keyword matches

Posted by zaq <b1...@klzlk.com>.
Hi,

I am very new to Lucene, so please forgive my stupidity around it.

Thanks for the suggestion. As far as I can tell, Term Vectors will give me a
list of keywords in a document and information about them (e.g. # of
occurrences). I am not sure how I would use that to match to a list of my
keywords. Is it really just a matter of doing string comparisons between the
terms and my list of keywords? What about stemming?

Thanks!

--
View this message in context: http://lucene.472066.n3.nabble.com/searching-for-finiite-keyword-matches-tp2954451p2957260.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: searching for finiite keyword matches

Posted by Evert Wagenaar <ev...@gmail.com>.
Hi zaq,

Have you tried using TermVectors? 

----- Original Message -----
From: "zaq" <b1...@klzlk.com>
To: general@lucene.apache.org
Sent: Tuesday, May 17, 2011 11:41:09 PM
Subject: searching for finiite keyword matches

Hi all,

I've been trying to figure out the best way to search a document for a set
of given keywords. In other words, I have a defined set of keywords I want
to match and a document within which to search for those keywords. I also
need to know which of the keywords match and not just whether any did.
Certainly, the simplest way seems to just run a query for each keyword
against the index that the doc is in. But seems rather crude and if the list
of keywords gets large, would be a nasty performance problem.

Can't figure out any more clever and/or efficient way to go about it. Any
suggestions?

Cheers,
Zaq

--
View this message in context: http://lucene.472066.n3.nabble.com/searching-for-finiite-keyword-matches-tp2954451p2954451.html
Sent from the Lucene - General mailing list archive at Nabble.com.