Re: Token position vs. token offset - how to bring them together?

2011-02-01 Thread Karolina Bernat
Hi, perhaps there is someone, who's trying to do the same thing so I just write down, how I got along with this problem. It is NOT the most elegant solution, but it works for me. I don't really know yet, how the performance of my search will be, but the tests look so far ok. For my phrase search

Fwd: Payloads API and support

2011-02-01 Thread Ophir Cohen
Hi Guys, I've been using Lucene for more than 5 years and it is a great tool - great job! Thanks for everything... Lately I encountered the new payloads support and it looks its a great solution for my project. *The problem:* The use case is as follows: I need to support a way to calcul

Using different field when overriding computeNorm

2011-02-01 Thread Tsvika Rabkin
Hi, I would like to override default similarity's computeNorm to work with a different field, other than the query field. Here is the DefaultSimilarity implementation: @Override   public float computeNorm(String field, FieldInvertState state) {     final int numTerms;     if (discountOverlaps)  

RE: Using different field when overriding computeNorm

2011-02-01 Thread Ryan Aylward
I have had to do similar things to other methods of Similarity. In my example, I wanted to have different behavior for the tf() method for each field. The tf method does not include a field parameter as an input to it. The only solution I could come up with was to add a thread local to set the f

Re: Using different field when overriding computeNorm

2011-02-01 Thread Robert Muir
On Tue, Feb 1, 2011 at 1:51 PM, Ryan Aylward wrote: > I have had to do similar things to other methods of Similarity. In my > example, I wanted to have different behavior for the tf() method for each > field. The tf method does not include a field parameter as an input to it. > The only solutio

Payloads API and support

2011-02-01 Thread Ophir Cohen
Hi Guys, I've been using Lucene for more than 5 years and it is a great tool - great job! Thanks for everything... Lately I encountered the new payloads support and it looks its a great solution for my project. *The problem:* The use case is as follows: I need to support a way to calcul