I suspect that your boost values are too small to really influencethe scores very much. Have you tried using boost values of, say, d:5^100 OR uid:10^10 OR lang:lisp ?
But if you have specific documents that you *know* you want in specific places, why play around with boosting at all? You can use something like (untested pseudo code) TermDocs td = blah blah blah td.seek(new Term("uid", "5")); if (td.next()) { Document doc = IndexReader.document(td.doc()); ...now do whatever you want with the document } Note that this just gets the first doc with matching terms, but from your mail I'm assuming you're working with unique IDs.... Best Erick On Thu, May 21, 2009 at 2:15 AM, hacklisp <qingwuk...@gmail.com> wrote: > > Hi,balasubramanian Thanks for your reply. > > Both first:25 and second:90 perhaps include 'java' or not. > > I have set doc#90's boost is 3.15 and doc#25's boost is 1.0. I think that > is > key. I try to set query term boost to proper value, but it is not fix. to > one is okay, but another not. > > > balasubramanian sudaakeran wrote: > > > > > > My guess that this can happen when your document matches more than one > > condition. For example first:25 could match lang:java as well?? > > > > > > > > > > ----- Original Message ---- > > From: hacklisp <qingwuk...@gmail.com> > > To: java-user@lucene.apache.org > > Sent: Thursday, May 21, 2009 10:03:52 AM > > Subject: About sort questions > > > > > > I search 'lisp' with lucene application using the following query > > string: > > uid:5^3 OR uid:10^2 OR lang:lisp > > I hope result as following: > > > > first:5 (which id is 5) > > second:10 (which id is 10) > > others:other results sort according to relevance. > > > > it is always ok, but sometimes not, the second will display before the > > first. > > for example: > > uid:90^3 OR uid:25^2 OR lang:java > > first:25 (which id is 5) > > second:90 (which id is 10) > > others:other results sort according to relevance. > > > > I hope search to return results strictly according to my input order. > > Anyone can understand me? thanks in advance. > > Any point will be appreciate. > > -- > > View this message in context: > > http://www.nabble.com/About-sort-questions-tp23647738p23647738.html > > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/About-sort-questions-tp23647738p23648418.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >