the patch i have worked out allows passing up the DocValues returned by the ValueSourceScorer to the ValueSourceQuery and then on up via a getDocValues(). am i missing any design/performance issues or does this sound generally useful? i'll submit a patch to jira once everything is doc'd and tested appropriately.

this allows you do to things like:

FieldScoreQuery q = new FieldScoreQuery("qty", FieldScoreQuery.Type.INT);
Hits hits = searcher.search(q);
System.out.println(q.getDocValues().getAverageValue());
System.out.println(q.getDocValues().getMaxValue());
System.out.println(q.getDocValues().getMinValue());


- will


On Aug 24, 2007, at 5:17 PM, Grant Ingersoll wrote:

Can you provide more details on what you are trying to do? Are you trying to collect information from the FunctionQuery after it is done?

-Grant

On Aug 24, 2007, at 5:03 PM, Will Johnson wrote:

i'm looking at doing some statistical work with lucene searches and the function queries look like a nice starting point. i found the DocValues.getMin/Max/Avg functions already however there doesn't seem to be a nice way to get to this information without doing a fair amount of subclassing. it would seem possible to pass the DocValues or perhaps a new DocValuesStats object back up the chain to avoid having to do all of this extra work just to get some basic info from the query. is there some reason why this might be a bad idea/design or would a patch be interesting to anyone other than me?

- will

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to