Re: PayloadFunctions don't work the same since 4.1

2013-03-21 Thread Duke DAI
I'm not sure your problem relates to the function or getting payload itslef. But after 4.1, in DefaultSimilarity.scorePayload(int doc, int start, int end, BytesRef payload), you must leverage payload.offset and payload.length to get the bytes. (start and end won't get the exact bytes you want). Ho

PayloadFunctions don't work the same since 4.1

2013-03-21 Thread jimtronic
I have some custom Payload Functions that worked great up until version 4.1 and now I can't get any of them to work correctly. In fact, the existing ones -- AveragePayloadFunction, MaxPayloadFunction, and MinPayloadFunction don't seem to work properly either. This may be a problem in Solr, but sin

Re: high memory usage by indexreader

2013-03-21 Thread ash nix
Hi Ian, Thanks for your reply. The index is on NFS and there is no storage local/near to machine. Operating system is CentOS 6.3 with linux 2.6. It has 16 Gigs of memory. By initializing the Indexreader, I mean opening the IndexReader. I timed my operations using System.currentTimeMillis and exe

RE: WildCardTermEnum in Lucene 4.1

2013-03-21 Thread Uwe Schindler
You can do the following: Automaton automaton = WildcardQuery.toAutomaton(wildcardTerm); // this transforms the wildcard syntax with ? and * to a state machine CompiledAutomaton compiled = new CompiledAutomaton(automaton); // copiles the state machine TermsEnum enum = compiled.getTermsEnum(terms

Re: high memory usage by indexreader

2013-03-21 Thread Ian Lea
That number of docs is far more than I've ever worked with but I'm still surprised it takes 4 minutes to initialize an index reader. What exactly do you mean by initialization? Show us the code that takes 4 minutes. What version of lucene? What OS? What disks? -- Ian. On Wed, Mar 20, 2013

WildCardTermEnum in Lucene 4.1

2013-03-21 Thread Ramprakash Ramamoorthy
Team, We are in the process of migrating our codebase from lucene 2.3(Yeah, its way older) to lucene 4.1. We had previously used WildCardTermEnum in our code base.