Hi, You didn't say much about how your backend is configured, so it's hard to tell, but I imagine you could have multiple fields based on the same original data and one of those fields could be highly boosted (via dismax/edismax) field for exact matches.
Otis ---- Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ ----- Original Message ---- > From: Bogdan STOICA <bogdan.st...@gmail.com> > To: solr-user@lucene.apache.org > Sent: Thu, April 21, 2011 1:29:44 PM > Subject: Solr search based on list of terms. Order by max(score) for each term. > > Hello, > > I am trying to query a solr server in order to obtain the most relevant > results for a list of terms. > > For example i have the list of words "nokia", "iphone", "charger" > > My schema contains the following data: > nokia > iphone > nokia iphone otherwords > nokia white > iphone white > > If I run a simple query like q=nokia OR iphone OR charger i get "nokia > iphone otherwords" as the most relevant result (because it contains more > query terms) > > I would like to get "nokia" or "iphone" or "iphone white" as first results, > because for each individual term they would be the most relevant. > > In order to obtain the correct list i would do a query for each term, then > aggregate the results and order them based on the maximum score. > > Can I make this query in one request? > > This question has also been asked on > >http://stackoverflow.com/questions/5743264/solr-search-based-on-list-of-terms-order-by-maxscore-for-each-term >m > > Thank you. >