You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by John Blythe <jo...@curvolabs.com> on 2017/05/16 15:35:05 UTC

knowing which fields were successfully hit

hey all. i'm sending data out that could represent a purchased item or a
competitive alternative. when the results are returned i'm needing to know
which of the two were hit so i can serve up the *other*.

i can make a blunt instrument in the application layer to simply look for a
match between the queried terms and the resulting fields, but the problem
of fuzzy matching and some of the special analysis being done to get the
hits will be for naught.

cursory googling landed me at a similar discussion that suggested using hit
highlighting or retrieving the debuggers explain data to sort through.

is there another, more efficient means or are these the two tools in the
toolbox?

thanks!

Re: knowing which fields were successfully hit

Posted by John Blythe <jo...@curvolabs.com>.
dorian - yup!
mikhail - interesting, will definitely check it out.

thanks-

-- 
*John Blythe*
Product Manager & Lead Developer

251.605.3071 | john@curvolabs.com
www.curvolabs.com

58 Adams Ave
Evansville, IN 47713

On Tue, May 16, 2017 at 1:16 PM, Dorian Hoxha <do...@gmail.com>
wrote:

> Something like elasticsearch named-queries, right
> https://www.elastic.co/guide/en/elasticsearch/reference/
> current/search-request-named-queries-and-filters.html
> ?
>
>
> On Tue, May 16, 2017 at 7:10 PM, John Blythe <jo...@curvolabs.com> wrote:
>
> > sorry for the confusion. as in i received results due to matches on
> field x
> > vs. field y.
> >
> > i've gone w a highlighting solution for now. the fact that it requires
> > field storage isn't yet prohibitive for me, so can serve well for now.
> open
> > to any alternative approaches all the same
> >
> > thanks-
> >
> > --
> > *John Blythe*
> > Product Manager & Lead Developer
> >
> > 251.605.3071 | john@curvolabs.com
> > www.curvolabs.com
> >
> > 58 Adams Ave
> > Evansville, IN 47713
> >
> > On Tue, May 16, 2017 at 11:37 AM, David Hastings <
> > hastings.recursive@gmail.com> wrote:
> >
> > > what do you mean "hit?" As in the user clicked it?
> > >
> > > On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
> > wrote:
> > >
> > > > hey all. i'm sending data out that could represent a purchased item
> or
> > a
> > > > competitive alternative. when the results are returned i'm needing to
> > > know
> > > > which of the two were hit so i can serve up the *other*.
> > > >
> > > > i can make a blunt instrument in the application layer to simply look
> > > for a
> > > > match between the queried terms and the resulting fields, but the
> > problem
> > > > of fuzzy matching and some of the special analysis being done to get
> > the
> > > > hits will be for naught.
> > > >
> > > > cursory googling landed me at a similar discussion that suggested
> using
> > > hit
> > > > highlighting or retrieving the debuggers explain data to sort
> through.
> > > >
> > > > is there another, more efficient means or are these the two tools in
> > the
> > > > toolbox?
> > > >
> > > > thanks!
> > > >
> > >
> >
>

Re: knowing which fields were successfully hit

Posted by "Dan ." <ro...@gmail.com>.
Hi,

What about a function query in the field list.

e.g.

for:
field.x
field.y

http://....?
q={!type=dismax qf='field.x field.y' v=$qq)
&qq=solr rocks
&fl=id,score,x_score:query({!type=dismax qf='field.x'
v=$qq}),y_score:query({!type=dismax qf='field.y' v=$qq})

Hit is x_score or y_score > 0
Note that you might get a score for both depending on data.

Dan

On 17 May 2017 at 12:06, John Blythe <jo...@curvolabs.com> wrote:

> hey erik, totally unaware of those two. we're able to retrieve metadata
> about the query itself that way?
>
> --
> *John Blythe*
> Product Manager & Lead Developer
>
> 251.605.3071 | john@curvolabs.com
> www.curvolabs.com
>
> 58 Adams Ave
> Evansville, IN 47713
>
> On Tue, May 16, 2017 at 1:54 PM, Erik Hatcher <er...@gmail.com>
> wrote:
>
> > Is this the equivalent of facet.query’s?   or maybe rather, group.query?
> >
> >         Erik
> >
> >
> >
> > > On May 16, 2017, at 1:16 PM, Dorian Hoxha <do...@gmail.com>
> > wrote:
> > >
> > > Something like elasticsearch named-queries, right
> > > https://www.elastic.co/guide/en/elasticsearch/reference/
> > current/search-request-named-queries-and-filters.html
> > > ?
> > >
> > >
> > > On Tue, May 16, 2017 at 7:10 PM, John Blythe <jo...@curvolabs.com>
> wrote:
> > >
> > >> sorry for the confusion. as in i received results due to matches on
> > field x
> > >> vs. field y.
> > >>
> > >> i've gone w a highlighting solution for now. the fact that it requires
> > >> field storage isn't yet prohibitive for me, so can serve well for now.
> > open
> > >> to any alternative approaches all the same
> > >>
> > >> thanks-
> > >>
> > >> --
> > >> *John Blythe*
> > >> Product Manager & Lead Developer
> > >>
> > >> 251.605.3071 | john@curvolabs.com
> > >> www.curvolabs.com
> > >>
> > >> 58 Adams Ave
> > >> Evansville, IN 47713
> > >>
> > >> On Tue, May 16, 2017 at 11:37 AM, David Hastings <
> > >> hastings.recursive@gmail.com> wrote:
> > >>
> > >>> what do you mean "hit?" As in the user clicked it?
> > >>>
> > >>> On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
> > >> wrote:
> > >>>
> > >>>> hey all. i'm sending data out that could represent a purchased item
> or
> > >> a
> > >>>> competitive alternative. when the results are returned i'm needing
> to
> > >>> know
> > >>>> which of the two were hit so i can serve up the *other*.
> > >>>>
> > >>>> i can make a blunt instrument in the application layer to simply
> look
> > >>> for a
> > >>>> match between the queried terms and the resulting fields, but the
> > >> problem
> > >>>> of fuzzy matching and some of the special analysis being done to get
> > >> the
> > >>>> hits will be for naught.
> > >>>>
> > >>>> cursory googling landed me at a similar discussion that suggested
> > using
> > >>> hit
> > >>>> highlighting or retrieving the debuggers explain data to sort
> through.
> > >>>>
> > >>>> is there another, more efficient means or are these the two tools in
> > >> the
> > >>>> toolbox?
> > >>>>
> > >>>> thanks!
> > >>>>
> > >>>
> > >>
> >
> >
>

Re: knowing which fields were successfully hit

Posted by John Blythe <jo...@curvolabs.com>.
hey erik, totally unaware of those two. we're able to retrieve metadata
about the query itself that way?

-- 
*John Blythe*
Product Manager & Lead Developer

251.605.3071 | john@curvolabs.com
www.curvolabs.com

58 Adams Ave
Evansville, IN 47713

On Tue, May 16, 2017 at 1:54 PM, Erik Hatcher <er...@gmail.com>
wrote:

> Is this the equivalent of facet.query’s?   or maybe rather, group.query?
>
>         Erik
>
>
>
> > On May 16, 2017, at 1:16 PM, Dorian Hoxha <do...@gmail.com>
> wrote:
> >
> > Something like elasticsearch named-queries, right
> > https://www.elastic.co/guide/en/elasticsearch/reference/
> current/search-request-named-queries-and-filters.html
> > ?
> >
> >
> > On Tue, May 16, 2017 at 7:10 PM, John Blythe <jo...@curvolabs.com> wrote:
> >
> >> sorry for the confusion. as in i received results due to matches on
> field x
> >> vs. field y.
> >>
> >> i've gone w a highlighting solution for now. the fact that it requires
> >> field storage isn't yet prohibitive for me, so can serve well for now.
> open
> >> to any alternative approaches all the same
> >>
> >> thanks-
> >>
> >> --
> >> *John Blythe*
> >> Product Manager & Lead Developer
> >>
> >> 251.605.3071 | john@curvolabs.com
> >> www.curvolabs.com
> >>
> >> 58 Adams Ave
> >> Evansville, IN 47713
> >>
> >> On Tue, May 16, 2017 at 11:37 AM, David Hastings <
> >> hastings.recursive@gmail.com> wrote:
> >>
> >>> what do you mean "hit?" As in the user clicked it?
> >>>
> >>> On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
> >> wrote:
> >>>
> >>>> hey all. i'm sending data out that could represent a purchased item or
> >> a
> >>>> competitive alternative. when the results are returned i'm needing to
> >>> know
> >>>> which of the two were hit so i can serve up the *other*.
> >>>>
> >>>> i can make a blunt instrument in the application layer to simply look
> >>> for a
> >>>> match between the queried terms and the resulting fields, but the
> >> problem
> >>>> of fuzzy matching and some of the special analysis being done to get
> >> the
> >>>> hits will be for naught.
> >>>>
> >>>> cursory googling landed me at a similar discussion that suggested
> using
> >>> hit
> >>>> highlighting or retrieving the debuggers explain data to sort through.
> >>>>
> >>>> is there another, more efficient means or are these the two tools in
> >> the
> >>>> toolbox?
> >>>>
> >>>> thanks!
> >>>>
> >>>
> >>
>
>

Re: knowing which fields were successfully hit

Posted by Erik Hatcher <er...@gmail.com>.
Is this the equivalent of facet.query’s?   or maybe rather, group.query?

	Erik



> On May 16, 2017, at 1:16 PM, Dorian Hoxha <do...@gmail.com> wrote:
> 
> Something like elasticsearch named-queries, right
> https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-named-queries-and-filters.html
> ?
> 
> 
> On Tue, May 16, 2017 at 7:10 PM, John Blythe <jo...@curvolabs.com> wrote:
> 
>> sorry for the confusion. as in i received results due to matches on field x
>> vs. field y.
>> 
>> i've gone w a highlighting solution for now. the fact that it requires
>> field storage isn't yet prohibitive for me, so can serve well for now. open
>> to any alternative approaches all the same
>> 
>> thanks-
>> 
>> --
>> *John Blythe*
>> Product Manager & Lead Developer
>> 
>> 251.605.3071 | john@curvolabs.com
>> www.curvolabs.com
>> 
>> 58 Adams Ave
>> Evansville, IN 47713
>> 
>> On Tue, May 16, 2017 at 11:37 AM, David Hastings <
>> hastings.recursive@gmail.com> wrote:
>> 
>>> what do you mean "hit?" As in the user clicked it?
>>> 
>>> On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
>> wrote:
>>> 
>>>> hey all. i'm sending data out that could represent a purchased item or
>> a
>>>> competitive alternative. when the results are returned i'm needing to
>>> know
>>>> which of the two were hit so i can serve up the *other*.
>>>> 
>>>> i can make a blunt instrument in the application layer to simply look
>>> for a
>>>> match between the queried terms and the resulting fields, but the
>> problem
>>>> of fuzzy matching and some of the special analysis being done to get
>> the
>>>> hits will be for naught.
>>>> 
>>>> cursory googling landed me at a similar discussion that suggested using
>>> hit
>>>> highlighting or retrieving the debuggers explain data to sort through.
>>>> 
>>>> is there another, more efficient means or are these the two tools in
>> the
>>>> toolbox?
>>>> 
>>>> thanks!
>>>> 
>>> 
>> 


Re: knowing which fields were successfully hit

Posted by Dorian Hoxha <do...@gmail.com>.
Something like elasticsearch named-queries, right
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-named-queries-and-filters.html
?


On Tue, May 16, 2017 at 7:10 PM, John Blythe <jo...@curvolabs.com> wrote:

> sorry for the confusion. as in i received results due to matches on field x
> vs. field y.
>
> i've gone w a highlighting solution for now. the fact that it requires
> field storage isn't yet prohibitive for me, so can serve well for now. open
> to any alternative approaches all the same
>
> thanks-
>
> --
> *John Blythe*
> Product Manager & Lead Developer
>
> 251.605.3071 | john@curvolabs.com
> www.curvolabs.com
>
> 58 Adams Ave
> Evansville, IN 47713
>
> On Tue, May 16, 2017 at 11:37 AM, David Hastings <
> hastings.recursive@gmail.com> wrote:
>
> > what do you mean "hit?" As in the user clicked it?
> >
> > On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
> wrote:
> >
> > > hey all. i'm sending data out that could represent a purchased item or
> a
> > > competitive alternative. when the results are returned i'm needing to
> > know
> > > which of the two were hit so i can serve up the *other*.
> > >
> > > i can make a blunt instrument in the application layer to simply look
> > for a
> > > match between the queried terms and the resulting fields, but the
> problem
> > > of fuzzy matching and some of the special analysis being done to get
> the
> > > hits will be for naught.
> > >
> > > cursory googling landed me at a similar discussion that suggested using
> > hit
> > > highlighting or retrieving the debuggers explain data to sort through.
> > >
> > > is there another, more efficient means or are these the two tools in
> the
> > > toolbox?
> > >
> > > thanks!
> > >
> >
>

Re: knowing which fields were successfully hit

Posted by Mikhail Khludnev <mk...@apache.org>.
John,
You can probably go with something like
https://issues.apache.org/jira/browse/LUCENE-7628. I even gave a talk about
this approach. But turns out it's really hard to support.

On Tue, May 16, 2017 at 8:10 PM, John Blythe <jo...@curvolabs.com> wrote:

> sorry for the confusion. as in i received results due to matches on field x
> vs. field y.
>
> i've gone w a highlighting solution for now. the fact that it requires
> field storage isn't yet prohibitive for me, so can serve well for now. open
> to any alternative approaches all the same
>
> thanks-
>
> --
> *John Blythe*
> Product Manager & Lead Developer
>
> 251.605.3071 | john@curvolabs.com
> www.curvolabs.com
>
> 58 Adams Ave
> Evansville, IN 47713
>
> On Tue, May 16, 2017 at 11:37 AM, David Hastings <
> hastings.recursive@gmail.com> wrote:
>
> > what do you mean "hit?" As in the user clicked it?
> >
> > On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com>
> wrote:
> >
> > > hey all. i'm sending data out that could represent a purchased item or
> a
> > > competitive alternative. when the results are returned i'm needing to
> > know
> > > which of the two were hit so i can serve up the *other*.
> > >
> > > i can make a blunt instrument in the application layer to simply look
> > for a
> > > match between the queried terms and the resulting fields, but the
> problem
> > > of fuzzy matching and some of the special analysis being done to get
> the
> > > hits will be for naught.
> > >
> > > cursory googling landed me at a similar discussion that suggested using
> > hit
> > > highlighting or retrieving the debuggers explain data to sort through.
> > >
> > > is there another, more efficient means or are these the two tools in
> the
> > > toolbox?
> > >
> > > thanks!
> > >
> >
>



-- 
Sincerely yours
Mikhail Khludnev

Re: knowing which fields were successfully hit

Posted by John Blythe <jo...@curvolabs.com>.
sorry for the confusion. as in i received results due to matches on field x
vs. field y.

i've gone w a highlighting solution for now. the fact that it requires
field storage isn't yet prohibitive for me, so can serve well for now. open
to any alternative approaches all the same

thanks-

-- 
*John Blythe*
Product Manager & Lead Developer

251.605.3071 | john@curvolabs.com
www.curvolabs.com

58 Adams Ave
Evansville, IN 47713

On Tue, May 16, 2017 at 11:37 AM, David Hastings <
hastings.recursive@gmail.com> wrote:

> what do you mean "hit?" As in the user clicked it?
>
> On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com> wrote:
>
> > hey all. i'm sending data out that could represent a purchased item or a
> > competitive alternative. when the results are returned i'm needing to
> know
> > which of the two were hit so i can serve up the *other*.
> >
> > i can make a blunt instrument in the application layer to simply look
> for a
> > match between the queried terms and the resulting fields, but the problem
> > of fuzzy matching and some of the special analysis being done to get the
> > hits will be for naught.
> >
> > cursory googling landed me at a similar discussion that suggested using
> hit
> > highlighting or retrieving the debuggers explain data to sort through.
> >
> > is there another, more efficient means or are these the two tools in the
> > toolbox?
> >
> > thanks!
> >
>

Re: knowing which fields were successfully hit

Posted by David Hastings <ha...@gmail.com>.
what do you mean "hit?" As in the user clicked it?

On Tue, May 16, 2017 at 11:35 AM, John Blythe <jo...@curvolabs.com> wrote:

> hey all. i'm sending data out that could represent a purchased item or a
> competitive alternative. when the results are returned i'm needing to know
> which of the two were hit so i can serve up the *other*.
>
> i can make a blunt instrument in the application layer to simply look for a
> match between the queried terms and the resulting fields, but the problem
> of fuzzy matching and some of the special analysis being done to get the
> hits will be for naught.
>
> cursory googling landed me at a similar discussion that suggested using hit
> highlighting or retrieving the debuggers explain data to sort through.
>
> is there another, more efficient means or are these the two tools in the
> toolbox?
>
> thanks!
>