lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Krišto <>
Subject Re: Compare the input string with stored string and Take decision.
Date Thu, 11 Jul 2013 06:29:43 GMT
On 07/11/2013 08:04 AM, Ankit Murarka wrote:
> a. I have a string of 190 characters.
> b. I need to store this string or the content of the string.
> c. For every request, I will compare the string with this stored string.
> d. If match, found I will increment the counter and once counter
> reaches 100 I need to block all request.
> I want to know will this searching the provided string with the input
> string can be achieved by Lucene. If yes, can anyone provide me some
> input on how to go ahead with this. I mean the type of analyzer to use
> etc.

I'm not sure if I have understood you well.

How do you compare string you got from request and stored string? Do you
do "storedString.equals(requestString)"?
If comparison is simple, than you don't need Lucene even if you have
thousands of stored strings. Just do it from scratch (simple hashtable
will do just fine).

Use lucene only if: comparison method is complicated (searching over
tokens which involves tokenization and normalization) and you have lots
of strings (documents).
Otherwise, it's an overkill.

    Ivan Krišto

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

View raw message