views:

18

answers:

0

Hey All, I'm having a problem building a complicated lucene query using the QueryParser.

This is basically what I need to search for one of the fields (allowed): This Field Basically stores some series of keywords that specify some access. It could look like:

  1. -PPartners:ALL
  2. -PLevel:ALL

  3. -PRegion:ASIA, EUROPE, AMERICAS

  4. -PAffiliate:GOOGLE

So basically for each item to search I need pass these values and see if the result either allow access for those or is non secured for each category

I tried using the following syntax in the query parser but that did not work.

allowed:(("PPartners:ALL " OR "PPartners:OEM") AND (“PLevel:ALL" OR "PLevel:Executive") AND ("PAffiliate:ALL" OR "PAffiliate:XCompany") AND (“PRegion:ALL" OR "PRegion:North America"))

I ended up with zero results, would you advice the best way to perform this search? Thanks,