Are you sure you want to be boosting the document fields at index time? From Hossman
<<<index time field boosts are a way to express things like 'this documents title is worth twice as much as the title of most documents'. query time boosts are a way to express 'i care about matches on this clause of my query twice as much as i do about matches to other clauses of my query' >>> But Lucene isn't magic, it's an engine that you have to make do what you want. You say "But i do not want to create one more field(default_field) that will contain all the values concatenated in it" Is this for theoretical reasons or do you have evidence that this is unacceptable? You haven't told us how much data you're indexing, so we have no way to reassure (or warn) you about trying this. I suggest you try the "bag of words" solution (this should not take you more than a few hours) and see if it's unacceptable before rejecting it. Best Erick On Tue, Sep 23, 2008 at 6:51 AM, Anshul jain <[EMAIL PROTECTED]>wrote: > Here is what I'm trying to do: > > say a lucene document: > name: abc ^10 > organization: xyz ^3 > > ^10 and ^3 are boosts in the document. > > now if I query name: abc ^5 AND organization: xyz this will work. > > but if I query (default_field): abc^5 AND xyz this won't work. > > Now what I want is that a text can be associated with more than one field. > i.e. > > (field1,field2,field3):value > name,(default_field),title: abc^10 > organization,(default_field),institute: xyz^3 > > then both of my queries will work. > > Is it possible to do so in lucene without changing the source? > If no then can anyone please explain the indexing and searching > mechanism for lucene, so that I can start working on it. > > The solution given by the java-users won't work for me as I do not > want to add all the contents of the document in a single field and > then search for that field, as this would increase the index size and > I've to index more than 10 million documents. Also > multifieldqueryparser will make it query execution inefficient, as > there will be thousands of fields. > > If I start storing just a single field as: (default_field): "name abc > organization xyz", then it is possible that some other documents might > get selected that are not relevant. Also i want to boost individual > fields in a document. > > Anshul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >