Re: StartsWith on DrillDown?

2016-11-17 Thread Matt Hicks
I understand this, and that's how I'm using it now, but my situation is
that in my application I want to offer the ability to auto-complete tags
that have results based on the current query.  This is why I'm looking for
a "StartsWith" filter on the tags.  Certainly I could get back all of the
tags and then filter them myself, but eventually there could be hundreds of
thousands of tags that I'm filtering through and if the user starts typing
"but" I want to be able to show "butterfly" if there are tag matches within
the current query.  I'm currently using taxonomy facets.

On Thu, Nov 17, 2016 at 4:23 AM Michael McCandless <
luc...@mikemccandless.com> wrote:

> The idea w/ drill down is you are running a "base query" (what the
> user actually searched for, originally) and then, if the user has
> clicked to drill down on any facet labels, you are also adding
> drill-down queries.
>
> You pass the "base query" to the DrillDownQuery constructor.
>
> And, normally, to add drill-down queries, you would use the add method
> that takes only strings, when the user clicked on a dimension + label.
>
> The add method that takes a custom drill-down query is for more
> advanced use cases, where you are able to create your own query that
> accomplishes the same thing as drilling down by a label; e.g., for
> numeric range facets, you would use this method to pass a numeric
> range filter down.
>
> Have you seen the demo facet examples, e.g.
>
> https://github.com/apache/lucene-solr/blob/master/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java
> ?
>
> Are you using SSDV facets or taxonomy facets?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Wed, Nov 16, 2016 at 5:29 PM, Matt Hicks  wrote:
> > My situation is that I simply don't understand how I'm supposed to pass a
> > `Query` into it.  Just passing in a `new QueryParser(facetName,
> > standardAnalyzer)` to `drillDown.add(facetName, queryParser.parse("valid
> > query"))` just always returns zero items.  I'm guessing it has to do with
> > needing a specific type of query?
> >
> > On Wed, Nov 16, 2016 at 4:05 PM Michael McCandless
> >  wrote:
> >>
> >> Can you post a test case showing the unexpected behavior?
> >>
> >> Mike McCandless
> >>
> >> http://blog.mikemccandless.com
> >>
> >> On Wed, Nov 16, 2016 at 1:55 PM, Matt Hicks  wrote:
> >> > Is this simply not possible to accomplish or does nobody on this list
> >> > know?
> >> >
> >> > On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks  wrote:
> >> >
> >> >> I'm trying to add a sub-query to my DrillDownQuery but I keep ending
> up
> >> >> with no results when I use add(String dim, Query subQuery).  I'm
> trying
> >> >> to
> >> >> query the tags that start with a specific String.
> >> >>
> >> >> Any suggestions of how to do this would be greatly appreciated. I am
> >> >> using
> >> >> Lucene Core 6.3.0.
> >> >>
> >> >> Thank you
> >> >>
>


Re: StartsWith on DrillDown?

2016-11-17 Thread Michael McCandless
The idea w/ drill down is you are running a "base query" (what the
user actually searched for, originally) and then, if the user has
clicked to drill down on any facet labels, you are also adding
drill-down queries.

You pass the "base query" to the DrillDownQuery constructor.

And, normally, to add drill-down queries, you would use the add method
that takes only strings, when the user clicked on a dimension + label.

The add method that takes a custom drill-down query is for more
advanced use cases, where you are able to create your own query that
accomplishes the same thing as drilling down by a label; e.g., for
numeric range facets, you would use this method to pass a numeric
range filter down.

Have you seen the demo facet examples, e.g.
https://github.com/apache/lucene-solr/blob/master/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java
?

Are you using SSDV facets or taxonomy facets?

Mike McCandless

http://blog.mikemccandless.com

On Wed, Nov 16, 2016 at 5:29 PM, Matt Hicks  wrote:
> My situation is that I simply don't understand how I'm supposed to pass a
> `Query` into it.  Just passing in a `new QueryParser(facetName,
> standardAnalyzer)` to `drillDown.add(facetName, queryParser.parse("valid
> query"))` just always returns zero items.  I'm guessing it has to do with
> needing a specific type of query?
>
> On Wed, Nov 16, 2016 at 4:05 PM Michael McCandless
>  wrote:
>>
>> Can you post a test case showing the unexpected behavior?
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>> On Wed, Nov 16, 2016 at 1:55 PM, Matt Hicks  wrote:
>> > Is this simply not possible to accomplish or does nobody on this list
>> > know?
>> >
>> > On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks  wrote:
>> >
>> >> I'm trying to add a sub-query to my DrillDownQuery but I keep ending up
>> >> with no results when I use add(String dim, Query subQuery).  I'm trying
>> >> to
>> >> query the tags that start with a specific String.
>> >>
>> >> Any suggestions of how to do this would be greatly appreciated. I am
>> >> using
>> >> Lucene Core 6.3.0.
>> >>
>> >> Thank you
>> >>

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



Re: StartsWith on DrillDown?

2016-11-16 Thread Matt Hicks
My situation is that I simply don't understand how I'm supposed to pass a
`Query` into it.  Just passing in a `new QueryParser(facetName,
standardAnalyzer)` to `drillDown.add(facetName, queryParser.parse("valid
query"))` just always returns zero items.  I'm guessing it has to do with
needing a specific type of query?

On Wed, Nov 16, 2016 at 4:05 PM Michael McCandless <
luc...@mikemccandless.com> wrote:

> Can you post a test case showing the unexpected behavior?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Wed, Nov 16, 2016 at 1:55 PM, Matt Hicks  wrote:
> > Is this simply not possible to accomplish or does nobody on this list
> know?
> >
> > On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks  wrote:
> >
> >> I'm trying to add a sub-query to my DrillDownQuery but I keep ending up
> >> with no results when I use add(String dim, Query subQuery).  I'm trying
> to
> >> query the tags that start with a specific String.
> >>
> >> Any suggestions of how to do this would be greatly appreciated. I am
> using
> >> Lucene Core 6.3.0.
> >>
> >> Thank you
> >>
>


Re: StartsWith on DrillDown?

2016-11-16 Thread Michael McCandless
Can you post a test case showing the unexpected behavior?

Mike McCandless

http://blog.mikemccandless.com

On Wed, Nov 16, 2016 at 1:55 PM, Matt Hicks  wrote:
> Is this simply not possible to accomplish or does nobody on this list know?
>
> On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks  wrote:
>
>> I'm trying to add a sub-query to my DrillDownQuery but I keep ending up
>> with no results when I use add(String dim, Query subQuery).  I'm trying to
>> query the tags that start with a specific String.
>>
>> Any suggestions of how to do this would be greatly appreciated. I am using
>> Lucene Core 6.3.0.
>>
>> Thank you
>>

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



Re: StartsWith on DrillDown?

2016-11-16 Thread Matt Hicks
Is this simply not possible to accomplish or does nobody on this list know?

On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks  wrote:

> I'm trying to add a sub-query to my DrillDownQuery but I keep ending up
> with no results when I use add(String dim, Query subQuery).  I'm trying to
> query the tags that start with a specific String.
>
> Any suggestions of how to do this would be greatly appreciated. I am using
> Lucene Core 6.3.0.
>
> Thank you
>


StartsWith on DrillDown?

2016-11-14 Thread Matt Hicks
I'm trying to add a sub-query to my DrillDownQuery but I keep ending up
with no results when I use add(String dim, Query subQuery).  I'm trying to
query the tags that start with a specific String.

Any suggestions of how to do this would be greatly appreciated. I am using
Lucene Core 6.3.0.

Thank you