I think you could express this with TermAutomatonQuery (https://issues.apache.org/jira/browse/LUCENE-5815 ) but it's likely very slow to run...
Mike McCandless http://blog.mikemccandless.com On Thu, Jul 17, 2014 at 3:22 AM, Yonghui Zhao <zhaoyong...@gmail.com> wrote: > Hi, > > I want to implement a query like phrase query with slop 0, but I can allow > one term mismatch. > > For example, the text is "A B C D E" > > I want to match this text with the query "A B C X E". > > X mismatches the D. > > i.e. Query "A B C D E" will match “W1 W2 W3 W4 W5”, the 5 words are > consecutive and at most one word is mismatched. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org