no-no-no. your implementation as slow as result processing, due to using
stored fields.
Fast way is something like
*org.apache.solr.schema.IntField.getValueSource(SchemaField,
QParser)* .
it's worth to check how the standard functions are build - check the static
{} block in org.apache.solr.search.
Hi Mikhail,
Thanks for the info.
If my FunctionQuery accesses stored fields like that:
public float floatVal(int docNum) {
Document doc = null;
try { doc = reader.document(docNum); } catch (Exception e) {}
return getSimilarityScore(doc);
}
Is it still the same case? Is there a faster way
Hello John,
> getting all the documents and analyzing their result fields?
is almost not ever possible. Lucene stored fields usually are really slow.
when FunctionQueries is backed of field values it uses Lucene FieldCache,
which is array of field values that's damn faster.
You are welcome.
O