Boosting documents individually for each user.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Boosting documents individually for each user.

ripos
I have web-site with a bunch of users.
There are documents, that can be searched by users.
I want to have result order to be slightly different for every user.

Particularly, I want to allow users to 'star' documents, which will lead to showing them as top results for them.
I want every user to have their individual 'stars' and individual search result order.

For example I have users Alex and Bob and documents Xanadu, Yummi and Zelor.
Alex has starred Xanadu and Bob has starred Yummi.
When they search and all documents are found with weights 0.3, 0.2 and 0.1 accordingly I want to show:
For Alex: *Xanadu*, Yummi, Zelor.
For Bob: *Yummi*, Xanadu, Zelor.

Relation (User, Document, Starred) is stored in a database. Users change their stars around 5 per second (for a whole site). There are about 10k users and 50k documents, every user stars about 100 documents, Lucene index is memory-based.
Ideally I do not want to change Lucene index every time user stars a document.

As far as I understand to allow Lucene make such an index I need to add fields, that corresponds to starred users to every document. I'm not sure, that this is appropriate solution, cause there will be huge number of boolean fields for many documents and too many changes in index.
Am also thinking about custom weight function, which uses database queries for boosting, but this is also looks pretty bad.
Also I could use java hashtables for storing weight function data.

What could you recommend me? What solution will be more appropriate?
If you could help me with google queries or direct links, I will be glad.
Thanks for your help in advance.