Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-15 Thread Cedric Ho
Thanks ~ Yes it seems this would be quite difficult to achieve with Lucene. Nevermind, I'll try to figure out a workaround for it. Thanks for helping =) Cedric On Feb 16, 2008 5:30 AM, Paul Elschot <[EMAIL PROTECTED]> wrote: > Hi Cedric, > > I think I'm beginning to get the point of the [10/5/2

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-15 Thread Paul Elschot
Hi Cedric, I think I'm beginning to get the point of the [10/5/2], and why you called that requirement a bit strange, see below. To use both normal position info and paragraph position info you'll need two separate, one normal, and one for the paragraphs. To use the normal field to determine the

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-15 Thread Grant Ingersoll
On Feb 14, 2008, at 3:44 AM, Cedric Ho wrote: Anyway, I know my requirement is a bit strange, so it's ok if I can't do this in Lucene. I'll settle with using a ThreadLocal to store the [10/5/2] weighting and retrieve it in the Similarity.scorePayload(...) function. I don't think you are stil

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-15 Thread Cedric Ho
Hi Paul, Do you mean the following? e.g. to index this: "first second third forth fifth six" originally it would be indexed as: (first,0) (second,1) (third,2) (forth,3) (fifth,4) (six,5) now it will be: (first,0) (second,0) (third,0) (forth,1) (fifth,1) (six,1) Then those Query classes that d

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-14 Thread Paul Elschot
Op Friday 15 February 2008 02:47:14 schreef Cedric Ho: > Sorry that I didn't make myself clear. > > [10/5/2] means for terms found in the 1st paragraph, give it score*10, > for terms in the 2nd, give it score*5, etc. > > So I don't know how to do this scoring if the position (paragraph) > informa

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-14 Thread Cedric Ho
Sorry that I didn't make myself clear. [10/5/2] means for terms found in the 1st paragraph, give it score*10, for terms in the 2nd, give it score*5, etc. So I don't know how to do this scoring if the position (paragraph) information is in a separate field. Cedric On Fri, Feb 15, 2008 at 7:15 A

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-14 Thread Paul Elschot
I have no idea what the [10/5/2] means, so I can't comment on that. In case I have missed it previously I'm sorry. My point was that payloads need not be used for different position info. It's possible to do that, and it may be good for performance in some cases, but one can revert to using anothe

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-14 Thread Cedric Ho
Hi Paul, Sorry I am not sure I understand your solution. Because I would need to apply this scoring logic to all the different types of Queries. A search may consists of something like: +(term1 phrase2 wildcard*) +spanNear(term3 term4) [10/5/2] And this [10/5/2] ratio have to be applied to the

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-13 Thread Paul Elschot
Op Thursday 14 February 2008 02:11:24 schreef Cedric Ho: > I am using Lucene's Built-in query classes: TernQuery, PhraseQuery, > WildcardQuery, BooleanQuery and many of the SpanQueries. > > The info I am going to pass in is just some weightings for different > part of the indexed contents. For exa

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-13 Thread Grant Ingersoll
The only Query that currently utilizes the scorePayload functionality is the BoostingTermQuery. I guess I would have a look at that as a starting point. On Feb 13, 2008, at 8:11 PM, Cedric Ho wrote: I am using Lucene's Built-in query classes: TernQuery, PhraseQuery, WildcardQuery, Boolean

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-13 Thread Cedric Ho
I am using Lucene's Built-in query classes: TernQuery, PhraseQuery, WildcardQuery, BooleanQuery and many of the SpanQueries. The info I am going to pass in is just some weightings for different part of the indexed contents. For example if the payload indicate that a term is in the 2nd paragraph, t

Re: How to pass additional information into Similarity.scorePayload(...)

2008-02-13 Thread Grant Ingersoll
Are you writing your own Query? What kind of info did you have in mind? scorePayload is called from the query scoring class, so I am not sure how you would pass in info to it unless you were writing your own Query class. -Grant On Feb 13, 2008, at 4:31 AM, Cedric Ho wrote: Hi all, My