What methods do you use for your condition checks? Regexes ? Then you could for instance precompile the regexes (saves a lot of time). Any other method? I don’t ask about the exact condition check but only the methods you use within those checks.
> Am 27.11.2019 um 07:52 schrieb Sripra deep <sriprad...@madstreetden.com>: > > Hi Team, > I wrote a custom sort function that will read the field value and parse > and returns a float value that will be used for sorting. this field is > indexed, stored and docvalues enabled. my latency increases drastically > from 10ms when the filter loads 50 documents and 200ms when it loads 250 > documents and 1sec when it loads 1000 documents. > > This is my function: > > @Override > public FunctionValues getValues(Map context, LeafReaderContext reader) > throws IOException { > final FunctionValues vals = source.getValues(context, reader); > return new FunctionValues() { > public float floatVal(int doc) { > float toRet = isasc ? Float.MAX_VALUE : Float.MIN_VALUE; > /* > My custom logic in reading a string array and returning a value out > of some condition checks > */ > } > } > } > > Can you suggest me some suggestions on this ? > > Thanks, > Sripradeep P