I want my Lucene query to contain something similar to:
companyNam:mercedes trucks
Where it will do an exact match for the string "mercedes trucks" in the companyName field.
The companyName is an untokenized field, but anything with a space returns null results..
new TermQuery(new Term("companyName", "mercedes trucks"));
Always results 0 results if there is a space involved. Otherwise my program is working fine.
Maybe replace:
mercedes trucks
with
mercedes?trucks
Works for me.