// phraseHighlight = true, fieldMatch = true
FieldQuery fq = new FieldQuery( query, true, true );
// "a b c" w/ position-gap = 2
List<TermInfo> phraseCandidate = new ArrayList<TermInfo>();
phraseCandidate.add( new TermInfo( "a", 0, 1, 0 ) );
phraseCandidate.add( new TermInfo( "b", 2, 3, 2 ) );
phraseCandidate.add( new TermInfo( "c", 4, 5, 4 ) );
assertNull( fq.searchPhrase( F, phraseCandidate ) );
// "a b c"~1
query = pqF( 1F, 1, "a", "b", "c" );
// phraseHighlight = true, fieldMatch = true
fq = new FieldQuery( query, true, true );
// "a b c" w/ position-gap = 2
assertNotNull( fq.searchPhrase( F, phraseCandidate ) );
// "a b c" w/ position-gap = 3
phraseCandidate.clear();
phraseCandidate.add( new TermInfo( "a", 0, 1, 0 ) );
phraseCandidate.add( new TermInfo( "b", 2, 3, 3 ) );
phraseCandidate.add( new TermInfo( "c", 4, 5, 6 ) );
assertNull( fq.searchPhrase( F, phraseCandidate ) );
}