static FieldCacheImpl() { BYTE_PARSER = new AnonymousClassByteParser(); SHORT_PARSER = new AnonymousClassShortParser(); INT_PARSER = new AnonymousClassIntParser(); FLOAT_PARSER = new AnonymousClassFloatParser(); }
protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey) { Entry entry = (Entry)entryKey; System.String field = entry.field; ShortParser parser = (ShortParser)entry.custom; short[] retArray = new short[reader.MaxDoc()]; TermDocs termDocs = reader.TermDocs(); TermEnum termEnum = reader.Terms(new Term(field, "")); try { do { Term term = termEnum.Term(); if (term == null || (System.Object)term.Field() != (System.Object)field) { break; } short termval = parser.ParseShort(term.Text()); termDocs.Seek(termEnum); while (termDocs.Next()) { retArray[termDocs.Doc()] = termval; } }while (termEnum.Next()); } finally { termDocs.Close(); termEnum.Close(); } return(retArray); }
public static Either <TLeft, short> ParseToShort <TLeft>( this Either <TLeft, string> source, NumberStyles style, TLeft left) { return(source.FlatMap(x => ShortParser.Parse <TLeft>(x, style, left))); }
public static Either <TLeft, short> ParseToShort <TLeft>( this Either <TLeft, string> source, IFormatProvider provider, TLeft left) { return(source.FlatMap(x => ShortParser.Parse <TLeft>(x, provider, left))); }
public static Either <TLeft, short> ParseToShort <TLeft>( this string source, NumberStyles style, IFormatProvider provider, TLeft left) { return(ShortParser.Parse <TLeft>(source, style, provider, left)); }
static FieldCache_Fields() { DEFAULT = new FieldCacheImpl(); DEFAULT_BYTE_PARSER = new AnonymousClassByteParser(); DEFAULT_SHORT_PARSER = new AnonymousClassShortParser(); DEFAULT_INT_PARSER = new AnonymousClassIntParser(); DEFAULT_FLOAT_PARSER = new AnonymousClassFloatParser(); DEFAULT_LONG_PARSER = new AnonymousClassLongParser(); DEFAULT_DOUBLE_PARSER = new AnonymousClassDoubleParser(); NUMERIC_UTILS_INT_PARSER = new AnonymousClassIntParser1(); NUMERIC_UTILS_FLOAT_PARSER = new AnonymousClassFloatParser1(); NUMERIC_UTILS_LONG_PARSER = new AnonymousClassLongParser1(); NUMERIC_UTILS_DOUBLE_PARSER = new AnonymousClassDoubleParser1(); }
protected internal override System.Object CreateValue(IndexReader reader, Entry entryKey) { Entry entry = (Entry)entryKey; System.String field = entry.field; ShortParser parser = (ShortParser)entry.custom; if (parser == null) { return(wrapper.GetShorts(reader, field, Lucene.Net.Search.FieldCache_Fields.DEFAULT_SHORT_PARSER)); } short[] retArray = new short[reader.MaxDoc()]; TermDocs termDocs = reader.TermDocs(); TermEnum termEnum = reader.Terms(new Term(field)); try { do { Term term = termEnum.Term(); if (term == null || (System.Object)term.Field() != (System.Object)field) { break; } short termval = parser.ParseShort(term.Text()); termDocs.Seek(termEnum); while (termDocs.Next()) { retArray[termDocs.Doc()] = termval; } }while (termEnum.Next()); } catch (StopFillCacheException stop) { } finally { termDocs.Close(); termEnum.Close(); } return(retArray); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser) { return((short[])shortsCache.Get(reader, new Entry(field, parser))); }
public static Maybe <short> ParseToShort(this string source) { return(ShortParser.Parse(source)); }
public static Maybe <short> ParseToShort(this Maybe <string> source, NumberStyles style, IFormatProvider provider) { return(source.FlatMap(x => ShortParser.Parse(x, style, provider))); }
public static Maybe <short> ParseToShort(this Maybe <string> source, NumberStyles style) { return(source.FlatMap(x => ShortParser.Parse(x, style))); }
internal ShortComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser) { values = new short[numHits]; this.field = field; this.parser = (ShortParser)parser; }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser) { return (short[]) ((Cache) caches[System.Type.GetType("System.Int16")]).Get(reader, new Entry(field, parser)); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser, IState state) { return((short[])caches[typeof(short)].Get(reader, new Entry(field, parser), state)); }
internal ShortComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser) { values = new short[numHits]; this.field = field; this.parser = (ShortParser) parser; }
public static Either <TLeft, short> ParseToShort <TLeft>(this string source, TLeft left) { return(ShortParser.Parse(source, left)); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser, IState state) { return(_shortCache.Get(reader, new Entry(field, parser), state)); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, string field, ShortParser parser) { return((short[])caches[typeof(short)].Get(reader, new Entry(field, parser))); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser) { return((short[])((Cache)caches[System.Type.GetType("System.Int16")]).Get(reader, new Entry(field, parser))); }
public static Maybe <short> ParseToShort(this string source, NumberStyles style) { return(ShortParser.Parse(source, style)); }
// inherit javadocs public virtual short[] GetShorts(IndexReader reader, System.String field, ShortParser parser) { return (short[]) caches[typeof(short)].Get(reader, new Entry(field, parser)); }
public static Maybe <short> ParseToShort(this string source, NumberStyles style, IFormatProvider provider) { return(ShortParser.Parse(source, style, provider)); }