我知道,Lucene 文件说
Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:
NOT “jakarta apache”
然而,我要提出一个问题,即归还所有载有任期的文件。 我研究了一起铺设。 If I index the following two documents 查询<代码>*:* -content:fox在我只想一份文件时将这两份文件退回。 The RegexQuery 我知道我想要做的工作对业绩的影响。 问询只能用几份文件处理,因此我对业绩不感到担忧。 是否有办法撰写卢塞恩的问询,以获得我想要的东西?Doc0: content:The quick brown fox jumps over the lazy dog.
Doc1: (empty string)
content:^((?!fox).)*$
suggested by this StackOverflow answer returns one document but it does not seem to be working correctly because content:^((?!foo).)*$
returns one document as well when I expect it to return two documents.