Re: TermEnum.skipTo in 3.0.0 replacement

2009-12-10 Thread Ian Lea
>From the 2.9.1 javadocs: "Deprecated. This method is not performant and will be removed in Lucene 3.0. Use IndexReader.terms(Term) to create a new TermEnum positioned at a given term." It is recommended to upgrade to 2.9.1, fix all the deprecations (see the javadocs) and then upgrade, with a rec

Re: TermEnum.skipTo in 3.0.0 replacement

2009-12-10 Thread Erick Erickson
An easy way to find this kind of thing is to go to the 2.9.1 documentation and see where the deprecation alert sends you. FOr instance this is from TermEnum.skipTo(Term target) *Deprecated.* *This method is not performant and will be removed in Lucene 3.0. Use IndexReader.terms(Term)

RE: TermEnum.skipTo in 3.0.0 replacement

2009-12-10 Thread Uwe Schindler
This method was always a linear scan and very slow (because it was never implemented correctly). If you want to skip, close the termenum and retrieve a new one with IndexReader.terms(Term seekTo) [internally e.g. NumericRangeQuery does this, look into source code]. See also the deprecation message

Re: TermEnum.skipTo in 3.0.0 replacement

2009-12-10 Thread Konstantyn Smirnov
thanks guys! :) another question, what is faster indexReader.terms( t ) or 10 times termEnum.next() ? - Konstantyn Smirnov, CTO http://www.poiradar.ru www.poiradar.ru http://www.poiradar.com.ua www.poiradar.com.ua http://www.poiradar.com www.poiradar.com http://www.poiradar.de www.poirad