Apache solr and Votingapi

moshe weitzman - February 28, 2009 - 22:34
Project:Voting API
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Sort by votes DESC is a natural integration point. There is a hook that fires upon each vote. I propose that we mark the node for re-indexing at that time.

#1

JacobSingh - March 1, 2009 - 05:23

Hi Moshe,

I like the idea, although I'm a little nervous about the indexing volume, especially on a digg type site. I'm concerned in part about running into a "index deficit" where you have more nodes getting updated on average per cron run than nodes indexed during the run...

Is this just worrying about nothing?

I think that the next logical step (and I'd say a more important one) is to provide a boost on the votes field. hopefully something a little more subtle and usable where we derive a "popularity index" based on # of votes AND total rating and let users boost on this.

Best,
Jacob

#2

moshe weitzman - March 1, 2009 - 06:14

But you have to keep the votes field reasonable up to date so the boost does not solve the indexing problem.

Perhaps we need a throttle control which says that no node may be indexed more frequently than twice and hour.

#3

pwolanin - March 1, 2009 - 16:20

I'm not sure it's going to be an issue - likely there are only a few nodes that are getting much vote traffic on any given day.

#4

xnickmx - March 11, 2009 - 17:59

subscribing

#5

moshe weitzman - March 17, 2009 - 19:20
Status:active» needs review

OK, Here is a first stab. I have not fully tested it as testing is complicated by our many environments and single index and large content set. The parts that need testing are apachesolr_votingapi_apachesolr_update_index() and apachesolr_votingapi_apachesolr_modify_query(). All of this needs review.

AttachmentSize
apachesolr_votingapi.info 207 bytes
apachesolr_votingapi.module.txt 3 KB
README.txt 705 bytes

#6

pwolanin - March 18, 2009 - 21:51

I don't think this will work:

$document->votingapi_result_value = $value;

Is this a float or an int? You should use one of the dynamic fields - call it something like sis_votingapi_result

#7

moshe weitzman - March 19, 2009 - 18:13

Fixed problem pointed out in #4 by pwolanin.

AttachmentSize
apachesolr_votingapi.module.txt 2.95 KB

#8

pwolanin - March 19, 2009 - 19:21

Moshe and I discussed in IRC - I think this would be good to add to CVS/d.o as a separate project so that he does not need to wait on our review to iterate the code.

#9

moshe weitzman - October 12, 2009 - 17:31
Project:Apache Solr Search Integration» Voting
Version:6.x-1.x-dev» HEAD

@Eaton says he will maintain this in votingapi package.

#10

moshe weitzman - October 12, 2009 - 17:32
Project:Voting» Voting API
Version:HEAD» HEAD

#11

moshe weitzman - October 16, 2009 - 17:04
Title:Sorting based on votingapi totals» Apachesolr Sorting based on votingapi totals

This one adds the sort using simpler API from apachesolr RC3.

AttachmentSize
apachesolr_votingapi.module.txt 3.72 KB
README.txt 724 bytes

#12

Scott Reynolds - December 2, 2009 - 00:43
Title:Apachesolr Sorting based on votingapi totals» Apache solr and Votingapi

Im going to have a need for this so here is my battle plan. Moshe do you mind if I create a D.o Project for it?

Battle plans to extend this
1.) provide facet ranges like dates in Apache Solr module (1-20 votes, 20-40 votes etc...)
2.) Allow for indexing of multiple tags/content types functions
3.) Boosting on all of those
4.) Apache Solr Views support (drupal.org/project/apachesolr_views) for sort handlers

#13

moshe weitzman - December 2, 2009 - 05:29

sure, sounds like a good plan, scott.

#14

pwolanin - December 2, 2009 - 13:34

Look at the proposed updates here - including tie range fields http://drupal.org/node/641954

I think they are BC, so i'd like to get them in asap.

#15

Scott Reynolds - December 3, 2009 - 16:48

After reassessing our orginal IA with actual live data, we have decided to significatlly lower the priority of this feature. I thought orginally that I was going to start on it this week but after this review we have revised our IA and this feature as become significantly lower priority.

So if anyone stumbles on this or decides they want to take it on, don't allow my claim to ownership stop you.

 
 

Drupal is a registered trademark of Dries Buytaert.