Highlight question

2010-06-23 Thread Gregg Hoshovsky
I just started working with the highlighting.  I am using the default 
configurations. I have a field that I can get a single highlight to occur 
marking the data.

What I would like to do is this,

Given a word say 'tumor', and the sentence

 the lower tumor grew 1.5 cm. blah blah blah  we need to remove the tumor in 
the next surgery

I would like to get em the lower tumor grew 1.5 cm /em. blah blah 
blah  we need to ...em remove the tumor in the next /em. surgery

Thus finding multiple references to the work and  only grabbing a few words 
around it.



In the solrconfig.xml I have been able to change the hl.simple.pre/post 
variable, but when I try to change the hl,regex pattern or the hl.snippets they 
don't have any effect. I thought the hl.snippets would alow me to find more 
than one and highlight it, and well I tried a bunch of regex patterns but they 
didn't do anything.

here is a snippet of the config file.

Any help is appreciated.

Gregg


   !-- A regular-expression-based fragmenter (f.i., for sentence extraction) 
--
   fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter
lst name=defaults
  !-- slightly smaller fragsizes work better because of slop --
  int name=hl.snippets4/int  int name=hl.fragsize70/int
  !-- allow 50% slop on fragment sizes --
  float name=hl.regex.slop0.2/float
  !-- a basic sentence pattern --
  str name=hl.regex.pattern[-\w ,/\n\']{1,1}/str
/lst
   /fragmenter

   !-- Configure the standard formatter --
   formatter name=html class=org.apache.solr.highlight.HtmlFormatter 
default=true
lst name=defaults
  int name=hl.snippets4/int
 int name=hl.fragsize100/int
 str name=hl.simple.pre![CDATA[...em]]/str
 str name=hl.simple.post![CDATA[/em]]/str
/lst



Re: Highlight question

2010-06-23 Thread Ahmet Arslan
 In the solrconfig.xml I have been able to change the
 hl.simple.pre/post variable, but when I try to change the
 hl,regex pattern or the hl.snippets they don't have any
 effect. I thought the hl.snippets would alow me to find more
 than one and highlight it, and well I tried a bunch of regex
 patterns but they didn't do anything.

int name=hl.snippets4/int param should go to under default section of 
your default SearchHandler. 

requestHandler name=standard class=solr.SearchHandler default=true
lst name=defaults
str name=echoParamsall/str 
int name=hl.snippets4/int 
/lst
/requestHandler

Also hl.formatter=regex paremter is required to activate regular expression 
based fragmenter.





RE: Highlight question

2009-04-23 Thread Bertrand DUMAS-PILHOU

Thanks a lot for your answer, I'm going to test and I will reply.

Bertrand

Ensdorf Ken wrote:
 
 Add the following parameters to the url:
 
 hl=truehl.fl=xhtml
 
 http://wiki.apache.org/solr/HighlightingParameters
 
 
 
 -Original Message-
 From: Bertrand DUMAS-PILHOU [mailto:bdum...@eurocortex.fr]
 Sent: Wednesday, April 22, 2009 4:43 PM
 To: solr-user@lucene.apache.org
 Subject: Highlight question


 Hi everybody,

 I have an schema seems like this in SOLR:
 title, type:string , indexed not stored
 body, type:string, stemmed, indexed not stored
 xhtml, type:string, not indexed, stored

 When user make an search on field title, body or both, I want to
 highlight
 the match string in the xhtml field only.

 How I can do this ?

 Thanks and sorry for my english.
 --
 View this message in context: http://www.nabble.com/Highlight-question-
 tp23175851p23175851.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Highlight-question-tp23175851p23198244.html
Sent from the Solr - User mailing list archive at Nabble.com.



Highlight question

2009-04-22 Thread Bertrand DUMAS-PILHOU

Hi everybody,

I have an schema seems like this in SOLR:
title, type:string , indexed not stored
body, type:string, stemmed, indexed not stored
xhtml, type:string, not indexed, stored

When user make an search on field title, body or both, I want to highlight
the match string in the xhtml field only.

How I can do this ?

Thanks and sorry for my english.
-- 
View this message in context: 
http://www.nabble.com/Highlight-question-tp23175851p23175851.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: Highlight question

2009-04-22 Thread Ensdorf Ken
Add the following parameters to the url:

hl=truehl.fl=xhtml

http://wiki.apache.org/solr/HighlightingParameters



 -Original Message-
 From: Bertrand DUMAS-PILHOU [mailto:bdum...@eurocortex.fr]
 Sent: Wednesday, April 22, 2009 4:43 PM
 To: solr-user@lucene.apache.org
 Subject: Highlight question


 Hi everybody,

 I have an schema seems like this in SOLR:
 title, type:string , indexed not stored
 body, type:string, stemmed, indexed not stored
 xhtml, type:string, not indexed, stored

 When user make an search on field title, body or both, I want to
 highlight
 the match string in the xhtml field only.

 How I can do this ?

 Thanks and sorry for my english.
 --
 View this message in context: http://www.nabble.com/Highlight-question-
 tp23175851p23175851.html
 Sent from the Solr - User mailing list archive at Nabble.com.