lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: indexing all suffixes to support leading wildcard?
Date Fri, 29 Aug 2014 03:52:06 GMT
The "usual" approach is to index to a second field but.... backwards.
See ReverseStringFilter... Then all your leading wildcards
are really trailing wildcards in the reversed field.


On Thu, Aug 28, 2014 at 10:38 AM, Rob Nikander <>

> Hi,
> I've got some short fields (phone num, email) that I'd like to search using
> good old string matching.  (The full query is a boolean "or" that also uses
> real text fields.) I see the warnings about wildcard queries that start
> with *, and I'm wondering... do you think it would be a good idea to index
> all the suffixes?  Eg, a phone num 5551234, would become 7 values for the
> "phoneNum" field: 4, 34, 234, etc.  So "512*" would be a hit.
> And maybe do something with the boosts so it doesn't overvalue the match
> when it hits multiple values.  ?
> Rob

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message