[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-25 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586508#comment-13586508
 ] 

Commit Tag Bot commented on LUCENE-4748:


[branch_4x commit] Michael McCandless
http://svn.apache.org/viewvc?view=revision&revision=1449973

LUCENE-4748: add DrillSideways utility class to facets module


> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-25 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586496#comment-13586496
 ] 

Commit Tag Bot commented on LUCENE-4748:


[trunk commit] Michael McCandless
http://svn.apache.org/viewvc?view=revision&revision=1449972

LUCENE-4748: add DrillSideways utility class to facets module


> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-24 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585458#comment-13585458
 ] 

Shai Erera commented on LUCENE-4748:


Should DSQ perhaps be in its own class? Just to improve DS readability... 

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-24 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585339#comment-13585339
 ] 

Shai Erera commented on LUCENE-4748:


Great work Mike!

Few comments:
* The CHANGES line should not remove 'static methods' right?

* Can you add jdoc to FA.create(), something like "returns FA if all requests 
are CountFR, StandardFA otherwise"?
** And while on that, fix FacetsCollector.create to say "calls create(FA) by 
creating FA using FA.create" ... something like that

* This "// TODO: remove this limitation: it's silly?" -- can we handle it now? 
It's odd that we add a 'silly' limitation :). If we don't want the app to do 
it, then just throw the exception, and remove the TODO. Otherwise allow it?
** Same goes for this "// TODO: remove this limitation (allow pure browse".
** Unless, it's not easy to handle these TODOs now.

* This "for(int i=0;i Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584652#comment-13584652
 ] 

Michael McCandless commented on LUCENE-4748:


bq. Perhaps DrillSideways can indeed be an instance class, with a protected 
getFacetsAccumulator() method? 

+1

I think I'd add separate methods for getting drill-down and drill-sideways 
Accumulator.

But, what should the default impl be?  Should I factor out that code from 
FacetsCollector.create that carefully picks either StandardFA or FA (maybe into 
a new FacetsAccumulator.create)?

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584575#comment-13584575
 ] 

Shai Erera commented on LUCENE-4748:


I took a brief look at the path and there are two FacetCollectors used, for the 
drill-down counting and for each "sideway". Perhaps DrillSideways can indeed be 
an instance class, with a protected getFacetsAccumulator() method? The 
collector itself is not so important, it only collects matching documents. The 
accumulator does the heavy lifting and controls the FacetArrays. That way, 
Nicola can override and provide his own FacetArrays instance?

Are there benefits in having this class offer static methods?

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584498#comment-13584498
 ] 

Michael McCandless commented on LUCENE-4748:


Ahh OK I see.  This is like LinkedIn's faceted UI, where you can enter a custom 
name under each dimension, if you don't see the value in the top N already 
displayed.  EG 
http://www.linkedin.com/search/fpsearch?type=people&keywords=lisa&pplSearchOrigin=GLHD&pageKey=fps_results

I think you cannot do this with just FacetSearchParams today ... I'll update 
the patch to make this possible.  Maybe we need a factory to create FacetArrays 
... or maybe we go back to non-static class and you subclass & override a 
method to create each FacetArray ...

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Nicola Buso (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584399#comment-13584399
 ] 

Nicola Buso commented on LUCENE-4748:
-

I have this case (I'm sure I'm not alone):
http://markmail.org/search/?q=FacetRequest%20include%20residue#query:FacetRequest%20include%20residue%20list%3Aorg.apache.lucene.java-user+page:1+mid:2qgovhht5miqmhlk+state:results

I implemented this creating a facetcollector that take count of the selection 
the user has done. I've not the 4.2 version where you introduced 
FacetsCollector.create(..) method; I will check there if I find something 
interesting.

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584372#comment-13584372
 ] 

Michael McCandless commented on LUCENE-4748:


bq. can you change DrillSideways class so that accept optionally some kind of 
factory for the facet collector?

Hmm you mean instead of calling FacetsCollector.create?  Can you describe the 
use case behind this?  (Hmm maybe FacetSearchParams already exposes a way to 
control which collector is created?).

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-22 Thread Nicola Buso (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584320#comment-13584320
 ] 

Nicola Buso commented on LUCENE-4748:
-

Hi,

can you change DrillSideways class so that accept optionally some kind of 
factory for the facet collector? so that we can decide outside DrillSideways if 
we want a different implementation of the FacetCollector to be used!


Nicola.

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: DrillSideways-alternative.tar.gz, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-07 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574263#comment-13574263
 ] 

Shai Erera commented on LUCENE-4748:


Thanks for all the answers Mike!

The fixes look. And I suggest that all the nocommits that are optimizations 
should be converted to TODOs. We should get this feature in, optimize later.

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-07 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573318#comment-13573318
 ] 

Shai Erera commented on LUCENE-4748:


Few comments:

* I think that DrillSideways can take a DrillDownQuery (once we finish with 
LUCENE-4750)?
** It will eliminate .addDrillDown (and it's ok I think that DDQ too will 
enforce all passed CPs to belong to the same dimension)
** Though if we do that, how can we set minShouldMatch on sub-query?
** Maybe if DDQ itself won't wrap another Query, but just build a BQ over all 
CPs ... then the user will need to wrap, but we can add a utility method.

* In .search(), just set minShouldMatch to 1 if (drillDownQueries.size() == 1)? 
It reads simpler...
** Also, why do you need to add a fake Query? I understand the rewrite will 
eliminate BQ and return TQ, but what's the harm?
** Isn't minShouldMatch=1 in that case similar to TQ?

* In getDimIndex:
** Extract dims.size() to a variable so it's not executed in every loop?
** I think you can drop the if (cp.length > 0)? It doesn't make sense for 
someone to pass an empty CP. Also, you can assert on that in .addDrillDown()
*** BTW, I noticed that you test that in DrillSidewaysCollector ctor too.
** I wonder if we made 'dims' LinkedHashSet it would perform better than these 
contains() (in .addDrillDown), get(i). Then you could just do 
dims.get(fr.cp.components[0]). I didn't try that in code, so not sure if you 
can get its index...

Also, I think we could simplify things if DrillSideways worked like this:

* Either exposed a .getQuery() method, or was itself a Query (like DDQ).
* Either exposed a .getCollector() method (returning DrillSidewaysCollector) or 
if it was a Query, you'd just initialize a DrillSidewaysCollector (not a big 
deal, user-wise).
* The collector's getFacetResults() would do the "merging" work that I see in 
.search()

Then you:

* Won't need DrillSidewaysResult, which today wrap a List and 
TopDocs. Someone could MultiCollector.wrap(topDocsCollector, 
sidewaysCollector)? Just like w/ facets?
* Won't need the multitude of search() methods. Again, someone could wrap 
TopDocsCollector, CachingCollector, TopFieldsCollector...

In DrillSidewaysCollector ctor:
* if (drillSidewaysRequest == null) -- that means the user asked to drill-down 
on some CPs for dim X, but not requested to count it, right?
** Do we must throw an exception? Perhaps we can just drop the relevant Query 
clause? Although, it's not very expected that a user would do that ... so 
perhaps keep the code for simplicity.
* Instead of doing Collections.singletonList you can just pass the single 
FacetRequest to the vararg ctor. If you feel like it, we can optimize 
FacetSearchParams' vararg ctors to initialize a singletonList if 
facetRequests.length == 1.
* exactCount = Math.max(2, dims.size()); -- maybe add a comment why '2'?

In DrillSidewaysCollector.setScorer:
* Why does Scorer.getChildren() return a Collection and not List? We used to 
have that in IR.listCommits while in practice it was always a List. Can we fix 
Scorer?
** I looked at all Scorer.getChildren() impls and they either return a List 
(ArrayList in most cases) or Collections.singleton (which is a Set). So it's 
indeed dangerous to assume it's a List, but I think we should just fix Scorer?
* What do you mean by "// nocommit fragile: need tracker somehow..."? What's 
tracker?

In DrillSidewaysCollector.collect:
* Can you add some documentation to the 'if-else'?

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch, 
> LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I 

[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-06 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572456#comment-13572456
 ] 

Michael McCandless commented on LUCENE-4748:


Hmm that's a good point!

OK I think if we changed collect to also count the hits against each 
drill-sideways dimension, then the drill-sideways results would be "self 
contained", ie also contain any drill-down values for that field.

And then I think we can return a single list of facet results...

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-06 Thread Nicola Buso (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572354#comment-13572354
 ] 

Nicola Buso commented on LUCENE-4748:
-

I'm looking into it and I have a question.

why are your collecting facets in two different groups (drilldown and 
drillsideways)?
In the final end the user doesn't matter of these two groups and want them 
merged (a facet can be in both groups). Is there a specific use case you have 
in mind to maintain them separated?

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-03 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569924#comment-13569924
 ] 

Michael McCandless commented on LUCENE-4748:


bq. Whether DrillDown (and sideways) should have .search(), or .getCollector() 
(something I've been thinking about before looking at your 2nd patch) ... I 
think that .search() looks good. If needed, we can always add a getCollector() 
later.

I think we should somehow do a .getCollector().

For example, if you want to do grouping (using GroupingSearch) and faceting 
(using DrillSideways) ... you're kind of stuck because each of these classes 
does the "search" for you.

It's also a hassle having to make the N search methods (I still have a nocommit 
to add searchAfter...).

So a .getCollector would be nice so the app could use MultiCollector to run 
everything (maybe they need to do joins too!).

But the challenge is ... we'd also need .getQuery, because DrillSideways runs a 
different Query from what the user provided (and a different collector).  And 
then we'd need to expose the collector, and add methods to get the drill-down 
and drill-sideways results ...

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/facet
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-03 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569852#comment-13569852
 ] 

Shai Erera commented on LUCENE-4748:


bq. Now you instantiate DrillSideways, calls .addDrillDown one or more times, 
then call one of the search methods.

That's actually very cool!

bq. I think DrillDown ought to have a similar API

I agree! Today DrillDown API is kinda confusing (you even have a nocommit 
regarding that). E.g. how should one use DrillDown to construct and AND of ORs. 
Having DrillDown.add() will be a great simplification!

Whether DrillDown (and sideways) should have .search(), or .getCollector() 
(something I've been thinking about before looking at your 2nd patch) ... I 
think that .search() looks good. If needed, we can always add a getCollector() 
later.

I think it would be good if we can merge DrillDown and Sideways, though not 
sure how the API would look like at the moment. So maybe for now we keep them 
separated. I.e., Sideways requires heavy jdocs, explaining exactly what it 
does, and e.g. the multiple FacetArrays allocation, so if all that we get by 
merging is the joint .add() logic ... I'd rather keep them separated.

I plan to do a more thorough review tomorrow, but briefly scanning the new 
patch, this looks awesome!

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-03 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569804#comment-13569804
 ] 

Michael McCandless commented on LUCENE-4748:


{quote}
Since drill-down followed by drill-sideways is a sort of (re)filtering over the 
original result set, perhaps the query result (say ScoredDocIds) could be 
passed through rather than re-evaluating the Query? 
IIRC the scores should not change during drill-down (and sideways as well), so 
without re-evaluating this could perhaps save some juice?
{quote}

Yes, this would work correctly: the drill-sideways counts for dim X will be the 
same as the drill-down counts for dim X on the query just before you drilled 
into dim X.  So we could save counting the sideways counts for dim X (but, 
other dimensions previously drilled-down will still need new counting).

We'd need to run a different query, basically moving dim X up to the top 
BooleanQuery as a MUST, and of course the app would have to save & return the 
previous queries drill-down counts for dim X (which is a hassle in a stateless 
server app)...

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4748) Add DrillSideways helper class to Lucene facets module

2013-02-03 Thread Gilad Barkai (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569780#comment-13569780
 ] 

Gilad Barkai commented on LUCENE-4748:
--

Great idea!

Since drill-down followed by drill-sideways is a sort of (re)filtering over the 
original result set, perhaps the query result (say ScoredDocIds) could be 
passed through rather than re-evaluating the Query? 
IIRC the scores should not change during drill-down (and sideways as well), so 
without re-evaluating this could perhaps save some juice?

> Add DrillSideways helper class to Lucene facets module
> --
>
> Key: LUCENE-4748
> URL: https://issues.apache.org/jira/browse/LUCENE-4748
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael McCandless
>Assignee: Michael McCandless
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4748.patch, LUCENE-4748.patch
>
>
> This came out of a discussion on the java-user list with subject
> "Faceted search in OR": http://markmail.org/thread/jmnq6z2x7ayzci5k
> The basic idea is to count "near misses" during collection, ie
> documents that matched the main query and also all except one of the
> drill down filters.
> Drill sideways makes for a very nice faceted search UI because you
> don't "lose" the facet counts after drilling in.  Eg maybe you do a
> search for "cameras", and you see facets for the manufacturer, so you
> drill into "Nikon".
> With drill sideways, even after drilling down, you'll still get the
> counts for all the other brands, where each count tells you how many
> hits you'd get if you changed to a different manufacturer.
> This becomes more fun if you add further drill-downs, eg maybe I next drill
> down into Resolution=10 megapixels", and then I can see how many 10
> megapixel cameras all other manufacturers, and what other resolutions
> Nikon cameras offer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org