Вы можете сделать это, используя пользовательскую функцию и sapply
grading <- function(x)
{
grades <- cut(x,
breaks=c(0,seq(60,100,by=10)),
labels=c("F","D","C","B","A"))
return(grades)
}
## your list of scores #####
score<- c(50,40,70,80,90)
##sapply to find the grades #######
sapply(score,grading)
It's true that there has been changes, but they're not as substantial as it might seem. The most radical change that I can think of is that the api for the IndexSearcher.search() method has changed, but it really isn't that difficult to adapt your code to the new usage.
In general, the old methods are still there but are marked as deprecated. This is a good thing, because the reference manual specifies what you should use instead.
Lucene in Action is a great book. Take a look at the second edition recommended by KenE if possible, but otherwise I think you'll get a long way using the first edition, the manual and some common sense. As I said, the changes are not as daunting as you could imagine.
Второе издание Lucene in Action доступно в электронном формате здесь
Lucid Impression - это компания, предлагающая поддержку и консультации, связанные с Lucene. См. их руководство по Lucene . У них также есть поисковая машина , индексирующая множество материалов, связанных с Lucene.
Я нашел этот сайт полезным http://www.avajava.com/tutorials/lessons/how-do-i-perform-a-range-query.html