Re: QueryParser over multiple fields

2005-12-29 Thread euw

>
> Two options - MultiFieldQueryParser or building an aggregate single
> field to search.  I use the aggregate field option, which entails
> building an additional field for each document, I call it "contents",
> and index _all_ of the searchable text into that field.
>
>   Erik


How about a BooleanQuery? I have documents with text, headlines, and
keywords, each needing a different analyzer and boost factor. I'm
experimenting with PerFieldAnalyzerWrapper and KeywordAnalyzer (as
described in your book), constructing the Query from a
QueryParser.parse(query, field, analyzer) query on each of the fields,
connected as a BooleanQuery. Like this, i can use a different boost factor
and a different analyzer for each field, and tune the whole thing quite
easily. The drawback is that analyzer and query construction look a little
cumbersome.

As i said, i've been only experimenting with this. I don't know if this
would work in production code, but i don't see why not. What's your take
on this?

Ernst-Udo Wallenborn



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: QueryParser over multiple fields

2005-12-29 Thread euw
>

>
> That's a perfectly good approach as well.  I didn't mean to imply
> that there were only "two options", just that the two I suggested
> were the most commonly used ones.
>
>   Erik
>


Ah, for a moment i thought i had overlooked a "canonical" solution, i'm
quite new to lucene. Thanks.

BTW, Lucene in Action is a great book.

Ernst-Udo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]