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.

Best,
Erick


On Thu, Aug 28, 2014 at 10:38 AM, Rob Nikander <rob.nikan...@gmail.com>
wrote:

> 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
>

Reply via email to