For eg., say i have a ArrayList
of book items. Book items have attributes book_title
, book_author
, and book_isbn
.
I also have a simple string search query "query_str
" (say).
How can i sort the ArrayList
of book objects, based on search relevance of either book_title
, book_author
with "query_str
"?
I am an application developer, not very experience with search ranking algorithms, but I found Lucene
very interesting. The problem is, it is straightforward to sort a list of strings... but how to do it for a list of objects? (Maybe use the toString()
method)
How do i get started with Lucene for this?