You have at least two ways of doing this that I can think of off-hand.
-
You could do two searches, one for words starting with
band one for words containing abbut not starting withb, and then iterate through them. (Or useunion, or join the lists, or any variant of these.) -
You could use a conditional expression to add an additional value to the query to represent whether or not the word starts with
b, and then sort based on that additional value.