lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: InverseWildcardQuery
Date Fri, 30 Jul 2010 15:33:07 GMT
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message