Matthew Hall wrote:
Place a delimiter between the email addresses that doesn't get removed in your analyzer. (preferably something you know will never be searched on)

Or add them separately (rather than:
  doc.add(new Field("email", "[email protected] [email protected] [email protected]" ...);
use
  doc.add(new Field("email", "[email protected]");
  doc.add(new Field("email", "[email protected]");
  doc.add(new Field("email", "[email protected]");
), using an Analyzer that overrides getPositionIncrementGap(). This inserts a 'gap' between each set of Tokens for the same Field, which stops phrase queries from 'crossing the boundaries' between subsequent values.

Cheers,

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to