For the records that don't contain a field you can put a bogus value such as "empty" and then you can query on -UD:empty
Aviran http://aviran.mordos.com -----Original Message----- From: Robinson Raju [mailto:[EMAIL PROTECTED] Sent: Saturday, October 09, 2004 10:25 AM To: Lucene Users List Subject: A simple newbee question . How do i exclude a field ? Hi , i use lucene to search against a flatted DB table. I have a table which contains the following data . there are 3 records which contain the code RN , 27 which contain UD and 3266 which contain BLANK. code Number of records ------- ------------------------- 3269 RN 3 UD 27 if my searchString is "RN" , i get 3 if my searchString is "UD" , i get 27 if my searchString is "" , i get 3296 (in this case i bypass queryfilter) Now , I need to get number of records which do not contain UD . (similar to a DB query of NOT IN or !=). if the string is "-UD" , it doesnt work. Could you tell me how to construct a string for this ? Regards Robin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]