List Info

Thread: Customized search with Lucene?




Customized search with Lucene?
user name
2007-10-13 01:53:47
Hi,

I am looking for an easy (~preferred) way of implementing
customized search
with Lucene. What I mean by this is changing order of
returned hits
according to user profile. In simple words I would like to
be able to tweak
order of documents in Hits collection before it is presented
to the client.

Example: if user A issues a query "lucene" then
he/she tends to click the
third returned link (document #123). I would like to
"boost" document #123
for this user so the next time he/she issues the query
"lucene" again the
hit for the document #123 will be in the first or second
position (providing
that the index hasn't been modified).

Looking at the Searchable<http://lucene.zones.apache.org:8080/hudson/job/Lu
cene-Nightly/javadoc/org/apache/lucene/search/Searchable.htm
l>interface
it does not seem it supports this kind of flexibility. I
don't
want to use filter<
http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightl
y/javadoc/org/apache/lucene/search/Filter.html>of
sort<http
://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/ja
vadoc/org/apache/lucene/search/Sort.html>(they
are not appropriate for my goal).

Custom scoring<http://lucene.zones.apache.org:8080/huds
on/job/Lucene-Nightly/javadoc/org/apache/lucene/search/packa
ge-summary.html#scoring>seems
to be the only option left. At the first glance it seems
quite
complex; moreover, I am not sure it really allows me to
achieve my goal, but
if there is no other way then I have to try it...
Any suggestions?

Regards,
Lukas

-- 
http://blog.lukas-vlcek.
com/
Re: Customized search with Lucene?
country flaguser name
United States
2007-10-16 14:24:50
Where and how do you store this type of info:
  If user U1 search for query Q7 boost doc D5 by B17
  If user U2 search for query Q3 boost doc D15 by B2
Seems lots of info, and it must be persistent.

Perhaps o.a.l.search.function can help - assuming you
have this info available at search time, and can use
it to create a ValueSource.

Doron

"Lukas Vlcek" <lukas.vlcekgmail.com> wrote on 13/10/2007 08:53:47:

> Hi,
>
> I am looking for an easy (~preferred) way of
implementing
> customized search
> with Lucene. What I mean by this is changing order of
returned hits
> according to user profile. In simple words I would like
to be
> able to tweak
> order of documents in Hits collection before it is
presented to
> the client.
>
> Example: if user A issues a query "lucene"
then he/she tends toclick the
> third returned link (document #123). I would like to
"boost"
> document #123
> for this user so the next time he/she issues the query
"lucene"again the
> hit for the document #123 will be in the first or
second
> position (providing
> that the index hasn't been modified).
>
> Looking at the Searchable<http://l
ucene.zones.apache.org:
> 8080/hudson/job/Lucene-
>
Nightly/javadoc/org/apache/lucene/search/Filter.html>of
> sort<http://lucene.zones.apache.org:8080/hudson/job/Lucene-

>
Nightly/javadoc/org/apache/lucene/search/Sort.html>(they
> are not appropriate for my goal).
>
> Custom scoring<http://blog.lukas-vlcek.
com/


------------------------------------------------------------
---------
To unsubscribe, e-mail: java-user-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )