Escape your special characters. q=field:\? and q=field:\- should work fine.
Cheers Avlesh On Sat, Sep 5, 2009 at 4:10 AM, Mohamed Parvez <par...@gmail.com> wrote: > Say i have 3 fields, named field1,field2 and field3 > > I want to query all records that have "xxx" in field1 and filed3 should not > be null > > I tried > 1] q=field1:xxx&fq=? > Got an error saying => org.apache.lucene.queryParser.ParseException: Cannot > parse 'title:?': '*' or '?' not allowed as first character in WildcardQuery > > 2] q=filed1:xxx&fq=-x > Got an error saying => org.apache.lucene.queryParser.ParseException: Cannot > parse 'title:-smb': Encountered " "-" "- "" at line 1, column 6. Was > expecting one of: "(" ... "*" ... ... ... ... ... "[" ... "{" ... ... > > > Any suggestions? > > ---- > Thanks/Regards, > Parvez >