Highlight Fragments
Ok, I'm very frustrated. I've tried every configuraiton I can and parameters and I cannot get fragments to show up in the highlighting in solr. (no fragments at the bottom or highlights in the text. I must be missing something but I'm just not sure what it is. /select/?qt=standard&q=crayon&hl=true&hl.fl=synopsis,shortdescription&hl.fragmenter=gap&hl.snippets=3&debugQuery=true And I get highlight segment, but no fragments or phrase highlighting. My goal - if I'm doing this completely wrong - is to get google like snippets of text around the query term (or at mimimum to highlight the query term itself). Results: synopsis true 3 gap crayon synopsis standard true 2.1 − − ... . .. -- "hic sunt dracones"
Re: Highlight Fragments
This is the configuration for the two fields I have tried on On Tue, Sep 23, 2008 at 1:59 PM, wojtekpia <[EMAIL PROTECTED]> wrote: > > Make sure the fields you're trying to highlight are stored in your schema > (e.g. ) > > > > David Snelling-2 wrote: > > > > Ok, I'm very frustrated. I've tried every configuraiton I can and > > parameters > > and I cannot get fragments to show up in the highlighting in solr. (no > > fragments at the bottom or highlights in the text. I must be > > missing something but I'm just not sure what it is. > > > > > /select/?qt=standard&q=crayon&hl=true&hl.fl=synopsis,shortdescription&hl.fragmenter=gap&hl.snippets=3&debugQuery=true > > > > And I get highlight segment, but no fragments or phrase highlighting. > > > > My goal - if I'm doing this completely wrong - is to get google like > > snippets of text around the query term (or at mimimum to highlight the > > query > > term itself). > > > > Results: > > > > synopsis > > true > > 3 > > gap > > crayon > > synopsis > > standard > > true > > 2.1 > > > > > > − > > > > − > > ... > > . > > .. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > "hic sunt dracones" > > > > > > -- > View this message in context: > http://www.nabble.com/Highlight-Fragments-tp19636705p19636915.html > Sent from the Solr - User mailing list archive at Nabble.com. > > -- "hic sunt dracones"
Re: Highlight Fragments
Hmmm. That doesn't actually return anything which is odd because I know it's in the field if I do a query without specifying the field. http://qasearch.donorschoose.org/select/?q=synopsis:students returns nothing http://qasearch.donorschoose.org/select/?q=students returns items with query in synopsis field. This may be causing issues but I'm not sure why it's not working. We use this live and do very complex queries including facets that work fine. www.donorschoose.org On Tue, Sep 23, 2008 at 2:20 PM, wojtekpia <[EMAIL PROTECTED]> wrote: > > Try a query where you're sure to get something to highlight in one of your > highlight fields, for example: > > > /select/?qt=standard&q=synopsis:crayon&hl=true&hl.fl=synopsis,shortdescription > > > > David Snelling-2 wrote: > > > > This is the configuration for the two fields I have tried on > > > > > stored="true"/> > > > compressed="true"/> > > > > > > > > On Tue, Sep 23, 2008 at 1:59 PM, wojtekpia <[EMAIL PROTECTED]> wrote: > > > >> > >> Make sure the fields you're trying to highlight are stored in your > schema > >> (e.g. ) > >> > >> > >> > >> David Snelling-2 wrote: > >> > > >> > Ok, I'm very frustrated. I've tried every configuraiton I can and > >> > parameters > >> > and I cannot get fragments to show up in the highlighting in solr. (no > >> > fragments at the bottom or highlights in the text. I must be > >> > missing something but I'm just not sure what it is. > >> > > >> > > >> > /select/?qt=standard&q=crayon&hl=true&hl.fl=synopsis,shortdescription&hl.fragmenter=gap&hl.snippets=3&debugQuery=true > >> > > >> > And I get highlight segment, but no fragments or phrase highlighting. > >> > > >> > My goal - if I'm doing this completely wrong - is to get google like > >> > snippets of text around the query term (or at mimimum to highlight the > >> > query > >> > term itself). > >> > > >> > Results: > >> > > >> > synopsis > >> > true > >> > 3 > >> > gap > >> > crayon > >> > synopsis > >> > standard > >> > true > >> > 2.1 > >> > > >> > > >> > − > >> > > >> > − > >> > ... > >> > . > >> > .. > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > -- > >> > "hic sunt dracones" > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Highlight-Fragments-tp19636705p19636915.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > "hic sunt dracones" > > > > > > -- > View this message in context: > http://www.nabble.com/Highlight-Fragments-tp19636705p19637261.html > Sent from the Solr - User mailing list archive at Nabble.com. > > -- "hic sunt dracones"
Re: Highlight Fragments
Ok, thanks, that makes a lot of sense now. So, how should I be storing the text for the synopsis or shortdescription fields so it would be tokenized? Should it be text instead of string? Thank you very much for the help by the way. On Tue, Sep 23, 2008 at 2:49 PM, wojtekpia <[EMAIL PROTECTED]> wrote: > > Your fields are all of string type. String fields aren't tokenized or > analyzed, so you have to match the entire text of those fields to actually > get a match. Try the following: > > /select/?q=firstname:Kathryn&hl=on&hl.fl=firstname > > The reason you're seeing results with just q=students, but not > q=synopsis:students is because you're copying the synopsis field into your > field named 'text', which is of type 'text', which does get tokenized and > analyzed, and 'text' is your default search field. > > The reason you don't see any highlights with the following query is because > your 'text' field isn't stored. > > select/?q=text:students&hl=on&hl.fl=text > > > > > > David Snelling-2 wrote: > > > > Hmmm. That doesn't actually return anything which is odd because I know > > it's in the field if I do a query without specifying the field. > > > > http://qasearch.donorschoose.org/select/?q=synopsis:students > > > > returns nothing > > > > http://qasearch.donorschoose.org/select/?q=students > > > > returns items with query in synopsis field. > > > > This may be causing issues but I'm not sure why it's not working. We use > > this live and do very complex queries including facets that work fine. > > > > www.donorschoose.org > > > > > > > > On Tue, Sep 23, 2008 at 2:20 PM, wojtekpia <[EMAIL PROTECTED]> wrote: > > > >> > >> Try a query where you're sure to get something to highlight in one of > >> your > >> highlight fields, for example: > >> > >> > >> > /select/?qt=standard&q=synopsis:crayon&hl=true&hl.fl=synopsis,shortdescription > >> > >> > >> > >> David Snelling-2 wrote: > >> > > >> > This is the configuration for the two fields I have tried on > >> > > >> > >> > stored="true"/> > >> > >> > compressed="true"/> > >> > > >> > > >> > > >> > On Tue, Sep 23, 2008 at 1:59 PM, wojtekpia <[EMAIL PROTECTED]> > >> wrote: > >> > > >> >> > >> >> Make sure the fields you're trying to highlight are stored in your > >> schema > >> >> (e.g. ) > >> >> > >> >> > >> >> > >> >> David Snelling-2 wrote: > >> >> > > >> >> > Ok, I'm very frustrated. I've tried every configuraiton I can and > >> >> > parameters > >> >> > and I cannot get fragments to show up in the highlighting in solr. > >> (no > >> >> > fragments at the bottom or highlights in the text. I must > >> be > >> >> > missing something but I'm just not sure what it is. > >> >> > > >> >> > > >> >> > >> > /select/?qt=standard&q=crayon&hl=true&hl.fl=synopsis,shortdescription&hl.fragmenter=gap&hl.snippets=3&debugQuery=true > >> >> > > >> >> > And I get highlight segment, but no fragments or phrase > >> highlighting. > >> >> > > >> >> > My goal - if I'm doing this completely wrong - is to get google > like > >> >> > snippets of text around the query term (or at mimimum to highlight > >> the > >> >> > query > >> >> > term itself). > >> >> > > >> >> > Results: > >> >> > > >> >> > synopsis > >> >> > true > >> >> > 3 > >> >> > gap > >> >> > crayon > >> >> > synopsis > >> >> > standard > >> >> > true > >> >> > 2.1 > >> >> > > >> >> > > >> >> > − > >> >> > > >> >> > − > >> >> > ... > >> >> > . > >> >> > .. > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > "hic sunt dracones" > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://www.nabble.com/Highlight-Fragments-tp19636705p19636915.html > >> >> Sent from the Solr - User mailing list archive at Nabble.com. > >> >> > >> >> > >> > > >> > > >> > -- > >> > "hic sunt dracones" > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Highlight-Fragments-tp19636705p19637261.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > "hic sunt dracones" > > > > > > -- > View this message in context: > http://www.nabble.com/Highlight-Fragments-tp19636705p19637801.html > Sent from the Solr - User mailing list archive at Nabble.com. > > -- "hic sunt dracones"