Highlight Fragments

2008-09-23 Thread David Snelling
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 em/em in the text. I must be
missing something but I'm just not sure what it is.

/select/?qt=standardq=crayonhl=truehl.fl=synopsis,shortdescriptionhl.fragmenter=gaphl.snippets=3debugQuery=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:
lst name=params
str name=flsynopsis/str
str name=debugQuerytrue/str
str name=hl.snippets3/str
str name=hl.fragmentergap/str
str name=qcrayon/str
str name=hl.flsynopsis/str
str name=qtstandard/str
str name=hltrue/str
str name=version2.1/str
/lst
/responseHeader
−
result name=response numFound=237 start=0
−
...
.
..
/result
lst name=highlighting
lst name=206738/
lst name=184583/
lst name=203809/
lst name=201588/
lst name=207554/
lst name=157569/
lst name=199682/
lst name=196359/
lst name=202940/
lst name=190672/
/lst

-- 
hic sunt dracones


Re: Highlight Fragments

2008-09-23 Thread David Snelling
This is the configuration for the two fields I have tried on

field name=shortdescription type=string indexed=true stored=true/
field name=synopsis type=string indexed=true 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. field name=synopsis type=string stored=true /)



 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 em/em in the text. I must be
  missing something but I'm just not sure what it is.
 
 
 /select/?qt=standardq=crayonhl=truehl.fl=synopsis,shortdescriptionhl.fragmenter=gaphl.snippets=3debugQuery=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:
  lst name=params
  str name=flsynopsis/str
  str name=debugQuerytrue/str
  str name=hl.snippets3/str
  str name=hl.fragmentergap/str
  str name=qcrayon/str
  str name=hl.flsynopsis/str
  str name=qtstandard/str
  str name=hltrue/str
  str name=version2.1/str
  /lst
  /responseHeader
  −
  result name=response numFound=237 start=0
  −
  ...
  .
  ..
  /result
  lst name=highlighting
  lst name=206738/
  lst name=184583/
  lst name=203809/
  lst name=201588/
  lst name=207554/
  lst name=157569/
  lst name=199682/
  lst name=196359/
  lst name=202940/
  lst name=190672/
  /lst
 
  --
  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

2008-09-23 Thread David Snelling
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=standardq=synopsis:crayonhl=truehl.fl=synopsis,shortdescription



 David Snelling-2 wrote:
 
  This is the configuration for the two fields I have tried on
 
  field name=shortdescription type=string indexed=true
  stored=true/
  field name=synopsis type=string indexed=true 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. field name=synopsis type=string stored=true /)
 
 
 
  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 em/em in the text. I must be
   missing something but I'm just not sure what it is.
  
  
 
 /select/?qt=standardq=crayonhl=truehl.fl=synopsis,shortdescriptionhl.fragmenter=gaphl.snippets=3debugQuery=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:
   lst name=params
   str name=flsynopsis/str
   str name=debugQuerytrue/str
   str name=hl.snippets3/str
   str name=hl.fragmentergap/str
   str name=qcrayon/str
   str name=hl.flsynopsis/str
   str name=qtstandard/str
   str name=hltrue/str
   str name=version2.1/str
   /lst
   /responseHeader
   −
   result name=response numFound=237 start=0
   −
   ...
   .
   ..
   /result
   lst name=highlighting
   lst name=206738/
   lst name=184583/
   lst name=203809/
   lst name=201588/
   lst name=207554/
   lst name=157569/
   lst name=199682/
   lst name=196359/
   lst name=202940/
   lst name=190672/
   /lst
  
   --
   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

2008-09-23 Thread David Snelling
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:Kathrynhl=onhl.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:studentshl=onhl.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=standardq=synopsis:crayonhl=truehl.fl=synopsis,shortdescription
 
 
 
  David Snelling-2 wrote:
  
   This is the configuration for the two fields I have tried on
  
   field name=shortdescription type=string indexed=true
   stored=true/
   field name=synopsis type=string indexed=true 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. field name=synopsis type=string stored=true /)
  
  
  
   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 em/em in the text. I must
  be
missing something but I'm just not sure what it is.
   
   
  
 
 /select/?qt=standardq=crayonhl=truehl.fl=synopsis,shortdescriptionhl.fragmenter=gaphl.snippets=3debugQuery=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:
lst name=params
str name=flsynopsis/str
str name=debugQuerytrue/str
str name=hl.snippets3/str
str name=hl.fragmentergap/str
str name=qcrayon/str
str name=hl.flsynopsis/str
str name=qtstandard/str
str name=hltrue/str
str name=version2.1/str
/lst
/responseHeader
−
result name=response numFound=237 start=0
−
...
.
..
/result
lst name=highlighting
lst name=206738/
lst name=184583/
lst name=203809/
lst name=201588/
lst name=207554/
lst name=157569/
lst name=199682/
lst name=196359/
lst name=202940/
lst name=190672/
/lst
   
--
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