You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jones G <jo...@rediffmail.com> on 2004/07/15 04:19:41 UTC

One Field!

I have an index with multiple fields. Right now I am using MultiFieldQueryParser to search the fields. This means that if the same term occurs in multiple fields, it will be weighed accordingly. Is there any way to treat all the fields in question as one field and score the document accordingly without having to reindex.

Thanks.

Re: One Field!

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 14, 2004, at 10:19 PM, Jones G wrote:
> I have an index with multiple fields. Right now I am using 
> MultiFieldQueryParser to search the fields. This means that if the 
> same term occurs in multiple fields, it will be weighed accordingly. 
> Is there any way to treat all the fields in question as one field and 
> score the document accordingly without having to reindex.

You could change the coord() factor of Similarity in a custom 
implementation - that might do what you want with scoring.

But I prefer having a single queryable field that aggregates everything 
I want searchable, which would require re-indexing in your scenario.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org