lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: Should I avoid MultiFieldQueryParser?
Date Tue, 01 Jun 2010 05:20:53 GMT
What you lose by aggregating all real fields into 1 field is the ability to give fields different
scoring weights.
Is a match in the post title equally important as a match in the body or in one of the comments?
If yes, then aggregate.

Sematext :: :: Solr - Lucene - Nutch
Lucene ecosystem search ::

----- Original Message ----
> From: Bob Eastbrook <>
> To:
> Sent: Mon, May 17, 2010 12:49:32 AM
> Subject: Should I avoid MultiFieldQueryParser?
> Imagine a blog that needs to be searched.  I first thought I'd 
> index
posts and comments using these 
> fields:


> 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".

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


View raw message