daevaorn / djapian

High level Xapian integration for Django
Other
6 stars 3 forks source link

Collapsing capability #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add `collapse_by(field)` method to `ResultSet`. It allows to eliminate
duplicate documents or group documents by given field so they can be
represented as one in result set.

Original issue reported on code.google.com by daevaorn on 27 May 2009 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by daevaorn on 19 Sep 2009 at 9:14

GoogleCodeExporter commented 9 years ago
Do you have a hint how that could be implmented either at Djapian-level of or 
at 
application-level? I need this feature very much just right now! ;)

Original comment by esizi...@gmail.com on 22 Dec 2009 at 1:25

GoogleCodeExporter commented 9 years ago
Fill free to contribute!

In my plans it is only in 2.5 release so if you want it earlier you can write 
small (
believe) patch. :-)

Original comment by daevaorn on 23 Dec 2009 at 1:38

GoogleCodeExporter commented 9 years ago
I would highly appreciate your review of my patch in order to put it in 
upstream a 
little bit early then in 2.5 release as it is planned for now.

The patch seems to be quite trivial and in the same way as it is done for other 
ResultSet features like prefetch, order_by and stemming.

The patch has been created against /branches/2.3 branch in SVN.

Original comment by esizi...@gmail.com on 15 Feb 2010 at 3:19

Attachments:

GoogleCodeExporter commented 9 years ago
The patch has been updated to return None for Hit.collapse_count and 
Hit.collapse_key if 
collapse_by() has not been used. Tests have been updated too.

Original comment by esizi...@gmail.com on 15 Feb 2010 at 4:18

Attachments:

GoogleCodeExporter commented 9 years ago
You've broken my plans:-)

Patch looks great and I will apply it soon.

Original comment by daevaorn on 15 Feb 2010 at 8:36

GoogleCodeExporter commented 9 years ago
Done.

Original comment by daevaorn on 18 Feb 2010 at 9:34