Hi Alan, I've built custom SpanQuery derivatives that filter matches based on encoded information in the payload. Section/Page/Paragraph/Sentence IDs can be put here, and the case of the original surface form can be encoded here as well. I'm sure others can come up with creative uses. My uses of this only needed to occur at the SpanTermQuery level, and so no aggregation concerns.
I've certainly *heard of* influencing the score based on a payload but I don't recall that I've had to do it personally. Erik Hatcher; how about you? ~ David On Thu, Feb 7, 2019 at 4:26 AM Alan Woodward <[email protected]> wrote: > Hi all, > > The new intervals queries are now nearly at feature parity with Spans; the > implementations still outstanding are all to do with using payloads. > Currently, span queries allow you to filter out spans based on the payloads > of the matching terms, and also allow you to modify the score of the query > as a whole based on those payloads. I’d like to get some idea of how > people are actually using these functions. > > In terms of filtering, adding an IntervalSource that wraps a simple term > and filters it out based on the payload will be simple enough. Adding this > for compound intervals is more complicated, and I think trickier to reason > about, so I’d like to try and avoid doing this if possible - feedback on > actual use-cases would be helpful here. > > For scoring, intervals use a completely different scoring mechanism to > Spans, just returning a scaled score between 0 and [boost]. To include > term weighting as well, users should combine the Intervals query with a > boolean query consisting of all terms used in the IntervalsSource. This > doesn’t mix so well with payloads, but an alternative option here could be > to add a PayloadTermQuery that can adjust the term frequency of a term on a > particular document via a payload function. > > What do people think? Are there cases that I’ve missed, or other possible > uses here? > > - Alan > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Lucene/Solr Search Committer (PMC), Developer, Author, Speaker LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.solrenterprisesearchserver.com
