Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.
You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.
As an example, let's assume a Lucene index contains two fields, title and text and text is the default field.
If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:
 |
 |
 |
 |
title:"The Right Way" AND text:go |
 |
 |
 |
 |
or
 |
 |
 |
 |
title:"Do it right" AND right |
 |
 |
 |
 |
Since text is the default field, the field indicator is not required.
Note: The field is only valid for the term that it directly precedes, so the query
Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).