lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Eastbrook <baconeater...@gmail.com>
Subject Should I avoid MultiFieldQueryParser?
Date Mon, 17 May 2010 04:49:32 GMT
Imagine a blog that needs to be searched.  I first thought I'd index
posts and comments using these fields:

BlogPostTitle
BlogPostContent
BlogComment

There could be any number of BlogComments.

I have this working fine and use MultiFieldQueryParser to generate a
query.  It seems to work.  A search for "picnic" matches that term in
post titles, post contents, and comments.

However, "Lucene in Action" (2nd edition MEAP proof, chapter 5 section
4) seems to advocate against using MultiFieldQueryParser and instead
suggests using a single synthetic field to hold all searchable text.
Perhaps this field would be called "contents" or "keywords".

Is this accepted to be a best practice?  Should I dump a
BlogPostTitle, BlogPostContent, and its BlogComments into a single
field?

Bob

Mime
View raw message