Benjamin Hille
2008-Jun-12 14:07 UTC
[Xapian-discuss] Change document relevance on user feedback
Hello, before I use xapian for my project, I would like if it is possible to do the following (Have read a lot of the archive mailing list but I am not sure I got it right): the user is show a set of result for a given query the user select a document and click on to say if the document is relevant. if it does can I update the relevance of that document for the terms used? Thanks in advance Benjamin
Richard Boulton
2008-Jun-12 15:36 UTC
[Xapian-discuss] Change document relevance on user feedback
Benjamin Hille wrote:> Hello, > before I use xapian for my project, I would like if it is possible to do the > following (Have read a lot of the archive mailing list but I am not sure I > got it right): > the user is show a set of result for a given query > the user select a document and click on to say if the document is relevant. > if it does can I update the relevance of that document for the terms used?Yes, this is supported by Xapian. Briefly, the API allows you to supply a relevance set to the match process (which is a set of documents marked as relevant). It also allows a relevance set to be used to calculate a set of expansion terms (ie, terms which might be useful to add to the query to find documents similar to those marked as relevant). http://xapian.org/search.php supports this method of feedback - each result has a checkbox - if you click the checkbox and then click the "Search" button again, the termweights will be adjusted based on the new information, and results will be recalculated. For small queries, this often doesn't produce much direct improvement, because only the weights of the terms are modified, so two documents which match the same terms will often remain ranked in the same order, even if only one of the documents was relevant. However, xapian also supports calculation of a list of suggested "expansion" terms, which are displayed at the top of the screen in this case. These terms will also be updated based on the relevance information. You can click the boxes by these terms to add them to the query, but an alternative implementation is to simply add such terms automatically to the query ("behind the scenes", so that the user doesn't see them), which is more limited, but may be an easier interface for users. -- Richard
Benjamin Hille
2008-Jun-13 15:52 UTC
[Xapian-discuss] Fwd: Change document relevance on user feedback
---------- Forwarded message ---------- From: Benjamin Hille <benjamin at hille.me.uk> Date: Thu, Jun 12, 2008 at 4:56 PM Subject: Re: [Xapian-discuss] Change document relevance on user feedback To: Richard Boulton <richard at lemurconsulting.com> Yes, this is supported by Xapian.>Excellent I thought so.> > Briefly, the API allows you to supply a relevance set to the match process > (which is a set of documents marked as relevant). It also allows a > relevance set to be used to calculate a set of expansion terms (ie, terms > which might be useful to add to the query to find documents similar to those > marked as relevant). >do you use the RSet class to say "this Document is more relevant for this query" ?> > > http://xapian.org/search.php supports this method of feedback - each > result has a checkbox - if you click the checkbox and then click the > "Search" button again, the termweights will be adjusted based on the new > information, and results will be recalculated. For small queries, this > often doesn't produce much direct improvement, because only the weights of > the terms are modified, so two documents which match the same terms will > often remain ranked in the same order, even if only one of the documents was > relevant. > > However, xapian also supports calculation of a list of suggested > "expansion" terms, which are displayed at the top of the screen in this > case. These terms will also be updated based on the relevance information. > You can click the boxes by these terms to add them to the query, but an > alternative implementation is to simply add such terms automatically to the > query ("behind the scenes", so that the user doesn't see them), which is > more limited, but may be an easier interface for users.On the xapian search page when the user click the box "this document is relevant", how do you update the index to reflect this? Thanks for your helpl Benjamin> > > -- > Richard >
Benjamin Hille
2008-Jun-13 15:55 UTC
[Xapian-discuss] Change document relevance on user feedback
> >> the user is show a set of result for a given query >> the user select a document and click on to say if the document is >> relevant. >> if it does can I update the relevance of that document for the terms used? >> > > Yes, this is supported by Xapian. > > Briefly, the API allows you to supply a relevance set to the match process > (which is a set of documents marked as relevant). It also allows a > relevance set to be used to calculate a set of expansion terms (ie, terms > which might be useful to add to the query to find documents similar to those > marked as relevant). >I cannot find anywhere in API if it is possible to store back the relevance into the database. It looks like RSet does not write back into the db when you add a document to it. What really I need is once a user A as choosen the document as relevant for a query the same query by user B should have the document choosen by A as relevant. Benjamin
Olly Betts
2008-Jul-01 10:22 UTC
[Xapian-discuss] Change document relevance on user feedback
On Fri, Jun 13, 2008 at 04:55:51PM +0100, Benjamin Hille wrote:> I cannot find anywhere in API if it is possible to store back the relevance > into the database. It looks like RSet does not write back into the db when > you add a document to it. What really I need is once a user A as choosen the > document as relevant for a query the same query by user B should have the > document choosen by A as relevant.Note that it may not be true that a document which is relevant to a query for user A is also relevant to the exact same query for user B. Disambiguation pages on wikipedia nicely illustrate one reason for this - a word or phrase can have multiple meanings, and different users may be looking for different meanings which have the same expression. For example, a query for "stock" could mean many things: http://en.wikipedia.org/wiki/Stock_(disambiguation) Even if users are actually expressing the same meaning, they may not like the same pages. A Java guru might search for a standard class name to check some obscure detail and want reference material; a Java novice might search for the same class, but want tutorials. Cheers, Olly