开发者

Wildcard for terms in phrase - Lucene

开发者 https://www.devze.com 2023-01-01 07:34 出处:网络
Google\'s开发者_Go百科 query syntax allows to search phrases like \"as * as a skyscraper\" where the asterisk can match any term (or terms). Is there a way to achieve the same thing in Lucene? The pro

Google's开发者_Go百科 query syntax allows to search phrases like "as * as a skyscraper" where the asterisk can match any term (or terms). Is there a way to achieve the same thing in Lucene? The proximity operator ~ could be of use but it is not what I exactly want.


Try a SpanNearQuery. Mark Miller's SpanQuery Blog Post explains how to use it, and the examples are similar to what you describe.

0

精彩评论

暂无评论...
验证码 换一张
取 消