lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Johnson <willjohnsonsea...@gmail.com>
Subject Re: function query - get DocValues
Date Mon, 27 Aug 2007 13:43:02 GMT
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: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
> --------------------------
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message