Re: what is null value behavior in function queries?

2008-06-13 Thread Chris Hostetter

: is there some way to change this default value (preferably from outside via
: a properties file or something similar)

It's based on the FieldCache, which thinking about it a bit: the defualts 
come from the default values of int[], float[], etc...  I seem to recall a 
discussion in the past about the possibility of adding an option to 
FieldCache to allow people to specify a default -- but it doesn't exist 
now.  FieldCache would need to support that before FieldCache 
based ValueSources could support it

the safe bet is to index your data with default options on all the 
fields you care about for this type of use case.  if you want the 
default in function query cases but not in other cases (range queries, 
etc...) you'll need to fields (copyField should take care of this)



-Hoss



Re: what is null value behavior in function queries?

2008-06-05 Thread Umar Shah
thanks hoss,

will surely do that.

-umar



On Thu, Jun 5, 2008 at 4:35 AM, Chris Hostetter [EMAIL PROTECTED]
wrote:


 : I am using function queries to rank the results,
 : if some/ allthe fields (used in the function ) are missing from the
 document
 : what will be the ranking behavior for such documents?

 Off the top of my head, I believe it's zero, but an easy way to check is
 to run a simple linear function query with no offset and a slope of 1
 (esentially an identity fucntion) against a doc with no value for that
 field and see what you get.


 -Hoss




Re: what is null value behavior in function queries?

2008-06-05 Thread Umar Shah
i ran a test.
the value for the field is taken to be 0 for the documents which dont have
that field.

This will return a correct result
1. if the documents are to  be put in the end of the sort, AND
2. all the values are positive.

is there some way to change this default value (preferably from outside via
a properties file or something similar)



On Thu, Jun 5, 2008 at 12:42 PM, Umar Shah [EMAIL PROTECTED] wrote:

 thanks hoss,

 will surely do that.

 -umar




 On Thu, Jun 5, 2008 at 4:35 AM, Chris Hostetter [EMAIL PROTECTED]
 wrote:


 : I am using function queries to rank the results,
 : if some/ allthe fields (used in the function ) are missing from the
 document
 : what will be the ranking behavior for such documents?

 Off the top of my head, I believe it's zero, but an easy way to check is
 to run a simple linear function query with no offset and a slope of 1
 (esentially an identity fucntion) against a doc with no value for that
 field and see what you get.


 -Hoss





Re: what is null value behavior in function queries?

2008-06-04 Thread Chris Hostetter

: I am using function queries to rank the results,
: if some/ allthe fields (used in the function ) are missing from the document
: what will be the ranking behavior for such documents?

Off the top of my head, I believe it's zero, but an easy way to check is 
to run a simple linear function query with no offset and a slope of 1 
(esentially an identity fucntion) against a doc with no value for that 
field and see what you get.


-Hoss



what is null value behavior in function queries?

2008-05-30 Thread Umar Shah
Hi,

I am using function queries to rank the results,
if some/ allthe fields (used in the function ) are missing from the document
what will be the ranking behavior for such documents?

thanks
-umar