> I think you're suggesting, for example, "*:* AND -myfield:foo*".
Yes, I think that is equivalent. > If my document contains "myfield:foobar" and "myfield:dog", the document would > be thrown out because of the first field. I want to keep the document because > the second field does not match. OK, too hard for me ... > Related, is there a way to use wildcards to match the beginning of the field? > > org.apache.lucene.queryParser.ParseException: Cannot parse '*:* AND > -myfield:*foo*': '*' or '?' not allowed as first character in WildcardQuery Yes. QueryParser.setAllowLeadingWildcard(). -- Ian. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org