You may store the original text in the doc w/o index it and index the
lower case version without storing it. This may save you some space/time.
Eloi Rocha Neto wrote:
Hi Daniel,
I dont lowercase the field at index time, because I have to show the
results in the same way as it was found.
For instance:
Some fields indexed:
PP-Trip SubAlcance Seq Negativa
PP-Trip SubAlcance Seq Positiva
PS-Trip SubAlcance Seq Negativa
PS-Trip SubAlcance Seq Positiva
If I search for "PP-TRIP SUBALCANCE SEQ NEG", I want that the result
showed are:
PP-Trip SubAlcance Seq Negativa
PS-Trip SubAlcance Seq Negativa
Not:
pp-trip subalcance seq negativa
ps-trip subalcance seq negativa
A possible solution is store in a document object two fields: the original
and the lowercased. I use the last one to make the query, and the other one
to show the results. It works, but it doesnt smell good!
Thanks for your help!
Eloi
On 7/6/07, Daniel Noll <[EMAIL PROTECTED]> wrote:
On Friday 06 July 2007 11:39:00 Eloi Rocha Neto wrote:
> Hi,
>
> Anyone knows how to make a case insensitive search using a
FuzzyQuery?
>
> I want that the results coming from "PP-Trip SubAlcance Seq
Negativa",
> "pp-trip subAlcance seq negativa" and "PP-TRIP SUBALCANCE SEQ NEGATIVA"
be
> the same. The field must be indexed by "PP-Trip SubAlcance Seq
Negativa".
>
> My code:
> Query query = new FuzzyQuery( new Term( field, input ) ,
similarity
> ); Hits hits = indexSearcher.search(query);
>
> I really appreciate any help!
Why don't you just have your analyser lowercase the field at indexing
time? I
don't see why you would use a FuzzyQuery for something where a normal
PhraseQuery should suffice.
Daniel
--
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699
Web: http://nuix.com/ Fax: +61 2 9212 6902
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]