I have a Lucene index where one of the indexed fields contains a string that identifies the type of content.
For simplicity, say this field is called
(+fieldone:term^3.0 +classname:term^2.0) +(*:* _type:typeone^1.1)
Using just Lucene syntax you can simply keep the _type boost as SHOULD in the following way:
+fieldone:term^3.0 +classname:term^2.0 (_type:typeone)^2
you don't need wildcards.
Another solution would be using eDismax query parser then you can use the bq or bf parameter in order to boost a particular value for a field. You can use one of the following solutions:
Solution 1: you can boost your term in the following way:
Solution 2: you can use a query function in the following way:
where the results having _type=typeone are boosted by 3, the ones having typetwo are boosted by 2, otherwise it will be 1. You can modify that query according your needs.