I still think that the easiest would be a string query like this:
local query = [[ id = '1' and type = 'A' and (size = '2' or size = '3') ]]
If you really want to enforce the lucene concepts, then this would be possible:
local query = {
Query.term_AND{id='1', type='A'},
Query.term_OR{size='2', size='3'}
}
But I am not sure how we would handle the 'NOT' in the second case. What do you think?