Re: including time as a factor in relevance?

2006-07-15 Thread Brent Verner
[2006-07-15 14:06] WHIRLYCOTT said:
| I need to have my search result relevance influenced by time.  Older  
| things in my index are less relevant than newer things.  I don't want  
| to do a strict sort by date.  Is this supported somehow by using a  
| dismax request handler?  Or if you have other hints, I'm eager to  
| know what they are.

  I've recently used solr's FunctionQuery to do just this with great 
success.  Take a look at FunctionQuery and ReciprocalFloatFunction.
If I have some time later today, I'll put together a simple example.

cheers!
  Brent



Re: including time as a factor in relevance?

2006-07-15 Thread Yonik Seeley

On 7/15/06, WHIRLYCOTT [EMAIL PROTECTED] wrote:

I need to have my search result relevance influenced by time.  Older
things in my index are less relevant than newer things.  I don't want
to do a strict sort by date.  Is this supported somehow by using a
dismax request handler?  Or if you have other hints, I'm eager to
know what they are.


dismax handler has a bf (boosting function) parameter that may be used
to specify a function over the date field.

You could try something like setting bf to
recip(rord(mydatefield),1,1000,1000)^0.5
A reciprocal function over the reverse ordinal of the date field, with
a weight of .5 (adjust weight until you get the right balance)

http://incubator.apache.org/solr/docs/api/org/apache/solr/request/DisMaxRequestHandler.html


-Yonik


RE: client code for searching?

2006-07-15 Thread Darren Vengroff
I've been meaning to write some companion code to do searching.  I haven't
needed to search from Java yet, so I haven't written it.  Expect it in a few
weeks given my current schedule.

-D

-Original Message-
From: Brian Lucas [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 14, 2006 12:10 PM
To: solr-user@lucene.apache.org
Subject: RE: client code for searching?

http://wiki.apache.org/solr/SolJava


-Original Message-
From: WHIRLYCOTT [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 14, 2006 1:03 PM
To: solr-user@lucene.apache.org
Subject: Re: client code for searching?

I did before I sent the email to the list, actually.  Is there  
something specific on the wiki that you're able to point me at?

phil.

On Jul 14, 2006, at 3:00 PM, Brian Lucas wrote:

 Check the wiki, my friend.
 http://wiki.apache.org/solr



 -Original Message-
 From: WHIRLYCOTT [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 14, 2006 12:35 PM
 To: solr-user@lucene.apache.org
 Subject: Re: client code for searching?

 Yes, I need java, but I would be eager to read your python code to
 get some design ideas from it.

 phil.

 On Jul 14, 2006, at 2:32 PM, Mike Klaas wrote:

 On 7/14/06, WHIRLYCOTT [EMAIL PROTECTED] wrote:
 Does anybody have some client code for performing searches against a
 Solr installation?  I've seen the DocumentManagerClient for adding/
 dropping/etc docs from the index, but I don't see any client code in
 svn anywhere.

 I've written some client code for doing such in python--I assume
 you're looking for java?

 Did the list reach a consensus on where client for various languages
 fit into the grand scheme of things?

 -Mike


 --
 Whirlycott
 Philip Jacob
 [EMAIL PROTECTED]
 http://www.whirlycott.com/phil/




--
Whirlycott
Philip Jacob
[EMAIL PROTECTED]
http://www.whirlycott.com/phil/




Solr has integrated highlighting

2006-07-15 Thread Yonik Seeley

Those who aren't subscribed to solr-dev may be interested to know that
the lucene highlighter has been integrated into Solr, for both the
standard request handler, and the dismax handler.

See the highlight, highlightFields, and maxSnippets params documented here:
http://wiki.apache.org/solr/StandardRequestHandler

When highlighting is enabled, a new highlighting section is added to
responses.  Highlighted terms are marked up like so: emterm/em

Below is a sample for query terms ipod, USB
In the real response, the markup tags em/em are XML escaped so
each highlight snippet is a single string.


lst name=highlighting
 lst name=IW-02
   arr name=features
 strcar power adapter for emiPod/em, white/str
   /arr
   arr name=name
 stremiPod/em  emiPod/em Mini emUSB/em 2.0 Cable/str
   /arr
 /lst
 lst name=MA147LL/A
   arr name=features
 strplayback, Upgradeable firmware, emUSB/em 2.0
compatibility, Playback speed control, Rechargeable capability/str
   /arr
arr name=name
strApple 60 GB emiPod/em with Video Playback Black/str
   /arr
 /lst
/lst

The Lucene version in Solr was just updated to fix a highlighting bug
with overlapping tokens, so you may want to wait for the 7/16 nightly
solr build if you use WordDelimiterFilter.

-Yonik


Re: client code for searching?

2006-07-15 Thread WHIRLYCOTT

I added my code to jira in case anybody's interested.

https://issues.apache.org/jira/browse/SOLR-30

phil.

On Jul 15, 2006, at 5:11 PM, Darren Vengroff wrote:

I've been meaning to write some companion code to do searching.  I  
haven't
needed to search from Java yet, so I haven't written it.  Expect it  
in a few

weeks given my current schedule.

-D

-Original Message-
From: Brian Lucas [mailto:[EMAIL PROTECTED]
Sent: Friday, July 14, 2006 12:10 PM
To: solr-user@lucene.apache.org
Subject: RE: client code for searching?

http://wiki.apache.org/solr/SolJava


-Original Message-
From: WHIRLYCOTT [mailto:[EMAIL PROTECTED]
Sent: Friday, July 14, 2006 1:03 PM
To: solr-user@lucene.apache.org
Subject: Re: client code for searching?

I did before I sent the email to the list, actually.  Is there
something specific on the wiki that you're able to point me at?

phil.

On Jul 14, 2006, at 3:00 PM, Brian Lucas wrote:


Check the wiki, my friend.
http://wiki.apache.org/solr



-Original Message-
From: WHIRLYCOTT [mailto:[EMAIL PROTECTED]
Sent: Friday, July 14, 2006 12:35 PM
To: solr-user@lucene.apache.org
Subject: Re: client code for searching?

Yes, I need java, but I would be eager to read your python code to
get some design ideas from it.

phil.

On Jul 14, 2006, at 2:32 PM, Mike Klaas wrote:


On 7/14/06, WHIRLYCOTT [EMAIL PROTECTED] wrote:
Does anybody have some client code for performing searches  
against a

Solr installation?  I've seen the DocumentManagerClient for adding/
dropping/etc docs from the index, but I don't see any client  
code in

svn anywhere.


I've written some client code for doing such in python--I assume
you're looking for java?

Did the list reach a consensus on where client for various languages
fit into the grand scheme of things?

-Mike



--
Whirlycott
Philip Jacob
[EMAIL PROTECTED]
http://www.whirlycott.com/phil/





--
Whirlycott
Philip Jacob
[EMAIL PROTECTED]
http://www.whirlycott.com/phil/





--
   Whirlycott
   Philip Jacob
   [EMAIL PROTECTED]
   http://www.whirlycott.com/phil/