You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by SolrLover <bb...@gmail.com> on 2013/10/01 18:12:13 UTC

Auto Suggest - Time decay

I am trying to implement an auto suggest based on time decay function. I have
a separate index just to store auto suggest keywords.

I would be calculating the frequency over time rather than just calculating
just based on frequency alone. 

I am thinking of using a database to perform the calculation and update the
SOLR index with the boost calculated based on time decay function. I am not
sure if there is a better way to do this...

I need to boost the terms based on the frequency over time,

Ex: when someone searches for 'apple' 10000 times during a iphone launch
(one particular day) shouldn't really make apple come up in the auto
suggestion always when someone types in the keyword 'a' rather it should
lose its popularity exponentially..

Anyone has any suggestions?




--
View this message in context: http://lucene.472066.n3.nabble.com/Auto-Suggest-Time-decay-tp4092965.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Auto Suggest - Time decay

Posted by "Ing. Jorge Luis Betancourt Gonzalez" <jl...@uci.cu>.
Sorry, I forgot the link:

[1] - http://wiki.apache.org/solr/SolrRelevancyFAQ

----- Mensaje original -----
De: "Ing. Jorge Luis Betancourt Gonzalez" <jl...@uci.cu>
Para: solr-user@lucene.apache.org
Enviados: Martes, 1 de Octubre 2013 13:34:03
Asunto: Re: Auto Suggest - Time decay

For that core just use a boost factor as explained on [1]:

You could use a query like this to see (before make any change) how your suggestions will be retrieved, in this case a query for "goog" has been made, and recent documents will be boosted (an extra bonus will be given for the newer documents).

http://localhost:8983/solr/select?q={!boost b=recip(ms(NOW,manufacturedate_dt),3.16e-11,1,1)}goog

If this is enough for you you could poot the boost parameter in your request handler and make it even simpler so any query againsta this particular request handler will be automatically boosted by date.

PS: You could tweak the above formula used in the boost parameter for a more suitable to your needs.

----- Mensaje original -----
De: "SolrLover" <bb...@gmail.com>
Para: solr-user@lucene.apache.org
Enviados: Martes, 1 de Octubre 2013 12:19:51
Asunto: Re: Auto Suggest - Time decay

I am using a totally separate core for storing the auto suggest keywords.

Would you be able to send me some more details on your implementation? 



--
View this message in context: http://lucene.472066.n3.nabble.com/Auto-Suggest-Time-decay-tp4092965p4092969.html
Sent from the Solr - User mailing list archive at Nabble.com.
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu

Re: Auto Suggest - Time decay

Posted by "Ing. Jorge Luis Betancourt Gonzalez" <jl...@uci.cu>.
For that core just use a boost factor as explained on [1]:

You could use a query like this to see (before make any change) how your suggestions will be retrieved, in this case a query for "goog" has been made, and recent documents will be boosted (an extra bonus will be given for the newer documents).

http://localhost:8983/solr/select?q={!boost b=recip(ms(NOW,manufacturedate_dt),3.16e-11,1,1)}goog

If this is enough for you you could poot the boost parameter in your request handler and make it even simpler so any query againsta this particular request handler will be automatically boosted by date.

PS: You could tweak the above formula used in the boost parameter for a more suitable to your needs.

----- Mensaje original -----
De: "SolrLover" <bb...@gmail.com>
Para: solr-user@lucene.apache.org
Enviados: Martes, 1 de Octubre 2013 12:19:51
Asunto: Re: Auto Suggest - Time decay

I am using a totally separate core for storing the auto suggest keywords.

Would you be able to send me some more details on your implementation? 



--
View this message in context: http://lucene.472066.n3.nabble.com/Auto-Suggest-Time-decay-tp4092965p4092969.html
Sent from the Solr - User mailing list archive at Nabble.com.
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu

Re: Auto Suggest - Time decay

Posted by SolrLover <bb...@gmail.com>.
I am using a totally separate core for storing the auto suggest keywords.

Would you be able to send me some more details on your implementation? 



--
View this message in context: http://lucene.472066.n3.nabble.com/Auto-Suggest-Time-decay-tp4092965p4092969.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Auto Suggest - Time decay

Posted by "Ing. Jorge Luis Betancourt Gonzalez" <jl...@uci.cu>.
Are you using the suggester component? or a separated core? I've used a separated core to store suggestions and order this suggestions (queries performed on the frontend) using a time decay function, and it works great for me.

Regards,

----- Mensaje original -----
De: "SolrLover" <bb...@gmail.com>
Para: solr-user@lucene.apache.org
Enviados: Martes, 1 de Octubre 2013 12:12:13
Asunto: Auto Suggest - Time decay

I am trying to implement an auto suggest based on time decay function. I have
a separate index just to store auto suggest keywords.

I would be calculating the frequency over time rather than just calculating
just based on frequency alone. 

I am thinking of using a database to perform the calculation and update the
SOLR index with the boost calculated based on time decay function. I am not
sure if there is a better way to do this...

I need to boost the terms based on the frequency over time,

Ex: when someone searches for 'apple' 10000 times during a iphone launch
(one particular day) shouldn't really make apple come up in the auto
suggestion always when someone types in the keyword 'a' rather it should
lose its popularity exponentially..

Anyone has any suggestions?




--
View this message in context: http://lucene.472066.n3.nabble.com/Auto-Suggest-Time-decay-tp4092965.html
Sent from the Solr - User mailing list archive at Nabble.com.
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu
________________________________________________________________________________________________
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu