Re: MultiFieldQueryParser

2010-10-16 Thread Itamar Syn-Hershko
Perhaps you met this issue which I have already reported? https://issues.apache.org/jira/browse/LUCENE-2518 Itamar. On 14/10/2010 3:40 AM, Erick Erickson wrote: I'm not quite sure what you mean by "run a query against multiple fields". But would creating your own BooleanQuery where each claus

Copying Payload from one Token to the next

2010-10-16 Thread Christoph Hermann
Hello, how can i copy the Payload from the current token to the following token in a TokenFilter? I have implemented a TokenFilter and thought, that i could use input.incrementToken() to advance the stream to the next token and just copy the Payload to this next token. But the problem with thi

Re: integrating RAMDirectory in FSDirectory

2010-10-16 Thread Yakob
On 10/13/10, Erick Erickson wrote: > Try IndexWrite.addIndexes. I confess that I haven't used that since > 2.4, but I suspect it's what you want. > ok after I started asking around in stackoverflow regarding this problem. someone was kind enough to give an answer. well sort of. private int index

RE: scorePayload does not get called

2010-10-16 Thread Uwe Schindler
scorePayload should be called *if* there is a payload on the term you are searching for. If there is a payload on other terms you would not see it. So PayloadTermQuery only reports payloads on exactly the passed - in term (not on any other field or other term in the same field). Additionally, the

scorePayload does not get called

2010-10-16 Thread Christoph Hermann
Hello, i'm trying to introduce an additional weighting using payloads. Therefore i implemented my own Similarity class (see below) and implemented scorePayload(). My problem is, that scorePayload() is not called during search. On the other Hand i overwrote the tf() method and that one gets call

Re: API that return the amount of terms indexed

2010-10-16 Thread Michael McCandless
Ahh! You are right, we did expose this before 4.0. But yes it has the same requirement -- it only works on a SegmentReader. Mike On Sat, Oct 16, 2010 at 5:52 AM, Uwe Schindler wrote: > Hi Mike, > > As far as I know, 3.0 also has this method: > http://lucene.apache.org/java/3_0_2/api/core/org/a

RE: API that return the amount of terms indexed

2010-10-16 Thread Uwe Schindler
Hi Mike, As far as I know, 3.0 also has this method: http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/index/IndexRe ader.html#getUniqueTermCount() But it also only works on segment level, too! So you have to use getSequentialSubReaders/ReaderUtil.gatherSubReaders() and do it per seg

Re: API that return the amount of terms indexed

2010-10-16 Thread Michael McCandless
4.0 will have an API to get the number of unique terms for a given field, or across all fields, but only at the segment level. (Getting the count across segments requires a merge sort). 3.x and before doesn't have such an API, though the information is tracked under the hood. If you open the _X.