[jira] [Updated] (LUCENE-4750) Convert DrillDown to DrillDownQuery

2013-02-09 Thread Shai Erera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shai Erera updated LUCENE-4750:
---

Attachment: LUCENE-4750.patch

Patch updated to trunk + handles all nocommit. I moved to create a BQ 
on-the-fly, and implemented hashCode() / equals(). Also implemented clone() 
(there's a test showing what would happen if we don't).

.rewrite() throws exception if no baseQuery is given AND no drill-down 
categories too. However, if BQ has at least one clause (either baseQuery was 
given, or at least one drill-down category added), it permits it. If only 
baseQuery was given, it will rewrite to it, so I see no reason to throw an 
exception.

 Convert DrillDown to DrillDownQuery
 ---

 Key: LUCENE-4750
 URL: https://issues.apache.org/jira/browse/LUCENE-4750
 Project: Lucene - Core
  Issue Type: Improvement
  Components: modules/facet
Reporter: Shai Erera
Assignee: Michael McCandless
 Attachments: LUCENE-4750.patch, LUCENE-4750.patch


 DrillDown is a utility class for creating drill-down queries over a base 
 query and a bunch of categories. We've been asked to support AND, OR and AND 
 of ORs. The latter is not so simple as a static utility method though, so 
 instead we have some sample code ...
 Rather, I think that we can just create a DrillDownQuery (extends Query) 
 which takes a baseQuery in its ctor and exposes add(CategoryPath...), such 
 that every such group of categories is AND'ed with other groups, and 
 internally they are OR'ed. It's very similar to how you would construct a 
 BooleanQuery, only simpler and specific to facets.
 Internally, it would build a BooleanQuery and delegate rewrite, createWeight 
 etc to it.
 That will remove the need for the static utility methods .. or we can keep 
 static term() for convenience.

--
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] [Updated] (LUCENE-4750) Convert DrillDown to DrillDownQuery

2013-02-09 Thread Shai Erera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shai Erera updated LUCENE-4750:
---

Attachment: LUCENE-4750.patch

Thanks Mike, I added another ctor which doesn't take a base query and noted the 
pure browsing behavior if you pass null to the 2nd ctor.

I think that's ready, I'll commit shortly.

 Convert DrillDown to DrillDownQuery
 ---

 Key: LUCENE-4750
 URL: https://issues.apache.org/jira/browse/LUCENE-4750
 Project: Lucene - Core
  Issue Type: Improvement
  Components: modules/facet
Reporter: Shai Erera
Assignee: Michael McCandless
 Attachments: LUCENE-4750.patch, LUCENE-4750.patch, LUCENE-4750.patch


 DrillDown is a utility class for creating drill-down queries over a base 
 query and a bunch of categories. We've been asked to support AND, OR and AND 
 of ORs. The latter is not so simple as a static utility method though, so 
 instead we have some sample code ...
 Rather, I think that we can just create a DrillDownQuery (extends Query) 
 which takes a baseQuery in its ctor and exposes add(CategoryPath...), such 
 that every such group of categories is AND'ed with other groups, and 
 internally they are OR'ed. It's very similar to how you would construct a 
 BooleanQuery, only simpler and specific to facets.
 Internally, it would build a BooleanQuery and delegate rewrite, createWeight 
 etc to it.
 That will remove the need for the static utility methods .. or we can keep 
 static term() for convenience.

--
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] [Updated] (LUCENE-4750) Convert DrillDown to DrillDownQuery

2013-02-07 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-4750:
---

Attachment: LUCENE-4750.patch

Initial patch, still w/ nocommits, but the basic idea seems to work.

But: I had to disable 2 tests, because the new DDQ requires that OR'd paths 
share the same dim (CP.components[0]) and these 2 tests didn't ... but that 
makes me wonder: is there ever a real use case when we shouldn't enforce this?

 Convert DrillDown to DrillDownQuery
 ---

 Key: LUCENE-4750
 URL: https://issues.apache.org/jira/browse/LUCENE-4750
 Project: Lucene - Core
  Issue Type: Improvement
  Components: modules/facet
Reporter: Shai Erera
Assignee: Michael McCandless
 Attachments: LUCENE-4750.patch


 DrillDown is a utility class for creating drill-down queries over a base 
 query and a bunch of categories. We've been asked to support AND, OR and AND 
 of ORs. The latter is not so simple as a static utility method though, so 
 instead we have some sample code ...
 Rather, I think that we can just create a DrillDownQuery (extends Query) 
 which takes a baseQuery in its ctor and exposes add(CategoryPath...), such 
 that every such group of categories is AND'ed with other groups, and 
 internally they are OR'ed. It's very similar to how you would construct a 
 BooleanQuery, only simpler and specific to facets.
 Internally, it would build a BooleanQuery and delegate rewrite, createWeight 
 etc to it.
 That will remove the need for the static utility methods .. or we can keep 
 static term() for convenience.

--
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