: I am trying to create a query, that first will return a set : of results, then : it will give a boost to the results that have all the : keyword entered by the user.
If I understand you correctly: User will enter multiple keywords. Lets say a b c d. And you want documents - that contains/have all of the keywords (a b c d) - get higher scores (boosted). In other words if there are some documents in the collection that have all (a b c d), you want to see them at the top of the result set. And result set may contain/retrieve documents that have one or two of the keywords at the end of list. Am i correct? If that's you want, you don't need to do anything special. Lucene does it by default. Use default operator OR. The more query terms appears in a document, the more relevant that document is to the query. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org