The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

texture (13) [Avatar] Offline
#1
I am a little bit confuse about this topic because it starts saying that a user has no need to know about the field's name and using title:lucene to search for lucene in title could be confusing for users, but at the end you are not giving a solution to create a default way to support multiple fields (e.g. default_fieldsmilietitle body)); instead it appears to me that you are creating a field with multiple terms i.e. fieldsmiliea b c).

If possible please provide an example and explain it a little bit more.
mike.mccandless (221) [Avatar] Offline
#2
Re: 3.5.11 Field selection
Lucene's QueryParser cannot search multiple fields by default.

So, you provide it a single default field to use, for queries where the user does not explicitly state the field. This is nice because the user does not have to specify the field (the simple case) but they can if they want to (the advanced case).

However, MultiFieldQueryParser (covered in detail in section 5.4) is able to handle multiple fields -- that section also discusses other ways to handle multiple fields (a single catch-all field, DisjunctionMaxQuery).