Re: LTR 'feature' and passing date parameters

2017-10-18 Thread Dariusz Wojtas
Thank you very much Binoy.
This worked perfectly.

Best regards,
Dariusz Wojtas

On Wed, Oct 18, 2017 at 5:06 PM, Binoy Dalal  wrote:

> Dariusz,
> This problem is most probably occurring because solr does not store dates
> in the format you've specified. It's something like: 2017-10-08T12:23:00Z.
> You'll probably need to specify your date in your efi feature in the manner
> above to get it to work.
>
> You can find more details on dates here:
> https://lucene.apache.org/solr/guide/6_6/working-with-dates.html
>
> On Wed 18 Oct, 2017, 19:16 Dariusz Wojtas,  wrote:
>
> > Hi,
> > I am using the LTR functionality (SOLR 7) and need to define a feature
> that
> > will check if the given request parameter of type date (ie. '1998-11-23')
> > matches birthDate in the stored document. Date granularity should be on
> DAY
> > level.
> > Simply:
> > * if dates match - return 1
> > * otherwise (birthDate not set, or they do not match) - return 0
> >
> > I have several features and do run some model that gives me the final
> > score. I cannot find a way that will calculate value for date related
> > feature.
> >
> > Currently i am having problem even with passing the date param, ie
> > '1998-11-23' to the feature to treat it as a date.
> >
> > My 'efi.' param for date is defined as follows:
> >  efi.searchBirthDate=1998-11-23
> >
> > In my feature I want to compare dates using the ms(x,y) function and
> check
> > if they are equal.
> >  ms(${searchBirthDate}, birthDate)
> >
> > But I get exception on calculating the feature:
> > Invalid Date String:'1998-11-23'
> >
> > Any idea how to solve such problem?
> >
> > Best regards,
> > Dariusz Wojtas
> >
> --
> Regards,
> Binoy Dalal
>


Re: LTR 'feature' and passing date parameters

2017-10-18 Thread Binoy Dalal
Dariusz,
This problem is most probably occurring because solr does not store dates
in the format you've specified. It's something like: 2017-10-08T12:23:00Z.
You'll probably need to specify your date in your efi feature in the manner
above to get it to work.

You can find more details on dates here:
https://lucene.apache.org/solr/guide/6_6/working-with-dates.html

On Wed 18 Oct, 2017, 19:16 Dariusz Wojtas,  wrote:

> Hi,
> I am using the LTR functionality (SOLR 7) and need to define a feature that
> will check if the given request parameter of type date (ie. '1998-11-23')
> matches birthDate in the stored document. Date granularity should be on DAY
> level.
> Simply:
> * if dates match - return 1
> * otherwise (birthDate not set, or they do not match) - return 0
>
> I have several features and do run some model that gives me the final
> score. I cannot find a way that will calculate value for date related
> feature.
>
> Currently i am having problem even with passing the date param, ie
> '1998-11-23' to the feature to treat it as a date.
>
> My 'efi.' param for date is defined as follows:
>  efi.searchBirthDate=1998-11-23
>
> In my feature I want to compare dates using the ms(x,y) function and check
> if they are equal.
>  ms(${searchBirthDate}, birthDate)
>
> But I get exception on calculating the feature:
> Invalid Date String:'1998-11-23'
>
> Any idea how to solve such problem?
>
> Best regards,
> Dariusz Wojtas
>
-- 
Regards,
Binoy Dalal


LTR 'feature' and passing date parameters

2017-10-18 Thread Dariusz Wojtas
Hi,
I am using the LTR functionality (SOLR 7) and need to define a feature that
will check if the given request parameter of type date (ie. '1998-11-23')
matches birthDate in the stored document. Date granularity should be on DAY
level.
Simply:
* if dates match - return 1
* otherwise (birthDate not set, or they do not match) - return 0

I have several features and do run some model that gives me the final
score. I cannot find a way that will calculate value for date related
feature.

Currently i am having problem even with passing the date param, ie
'1998-11-23' to the feature to treat it as a date.

My 'efi.' param for date is defined as follows:
 efi.searchBirthDate=1998-11-23

In my feature I want to compare dates using the ms(x,y) function and check
if they are equal.
 ms(${searchBirthDate}, birthDate)

But I get exception on calculating the feature:
Invalid Date String:'1998-11-23'

Any idea how to solve such problem?

Best regards,
Dariusz Wojtas