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 Tolga <to...@ozses.net> on 2012/05/31 10:55:34 UTC
Hightlighting and excerpt
Hi,
Two separate things asked in one thread...
I am crawling my websites with nutch. When I index them, I'd like to be
able to highlight my keyword and display en excerpt containing that
keyword. I found a solution with highlight, but what can I about excerpt?
Thanks and regards,
Re: Hightlighting and excerpt
Posted by Jack Krupansky <ja...@basetechnology.com>.
The Solr example. As in the Solr tutorial.
See:
http://lucene.apache.org/solr/api/doc-files/tutorial.html
Index books.json from exampledocs and then enter a /browse request in your
web browser. Add the "&wt=xml" query parameter so that you can see the raw
XML response that shows the "highlighting" section rather than the
VelocityWriter output.
Since you said that highlighting was working for you, please post an example
of the "highlighting" section of a Solr response.
-- Jack Krupansky
-----Original Message-----
From: Tolga
Sent: Thursday, May 31, 2012 9:42 AM
To: solr-user@lucene.apache.org
Subject: Re: Hightlighting and excerpt
You mean http:///www.example.com:8983/solr/browse? It says "unknown
field 'cat'"
On 5/31/12 4:16 PM, Jack Krupansky wrote:
> Yes, that is what highlighting does - it extracts an excerpt and
> highlights search terms. You said you have highlighting working, so what
> else is it that you need?
>
> Try "/browse" in the Solr example. It does exactly what your example
> shows. So, what else is it that you are trying to do? Or if something
> isn't working, what specifically isn't working?
>
> -- Jack Krupansky
>
> -----Original Message----- From: Tolga
> Sent: Thursday, May 31, 2012 9:08 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Hightlighting and excerpt
>
> I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
> was stressed?
>
> On 5/31/12 3:54 PM, Jack Krupansky wrote:
>> Since highlighting, by definition, does highlight terms in "excerpts"
>> (snippets or fragments from a text field), what else is it that you need?
>>
>> -- Jack Krupansky
>>
>> -----Original Message----- From: Tolga
>> Sent: Thursday, May 31, 2012 4:55 AM
>> To: solr-user@lucene.apache.org
>> Subject: Hightlighting and excerpt
>>
>> Hi,
>>
>> Two separate things asked in one thread...
>>
>> I am crawling my websites with nutch. When I index them, I'd like to be
>> able to highlight my keyword and display en excerpt containing that
>> keyword. I found a solution with highlight, but what can I about excerpt?
>>
>> Thanks and regards,
>
Re: Hightlighting and excerpt
Posted by Tolga <to...@ozses.net>.
You mean http:///www.example.com:8983/solr/browse? It says "unknown
field 'cat'"
On 5/31/12 4:16 PM, Jack Krupansky wrote:
> Yes, that is what highlighting does - it extracts an excerpt and
> highlights search terms. You said you have highlighting working, so
> what else is it that you need?
>
> Try "/browse" in the Solr example. It does exactly what your example
> shows. So, what else is it that you are trying to do? Or if something
> isn't working, what specifically isn't working?
>
> -- Jack Krupansky
>
> -----Original Message----- From: Tolga
> Sent: Thursday, May 31, 2012 9:08 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Hightlighting and excerpt
>
> I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
> was stressed?
>
> On 5/31/12 3:54 PM, Jack Krupansky wrote:
>> Since highlighting, by definition, does highlight terms in "excerpts"
>> (snippets or fragments from a text field), what else is it that you
>> need?
>>
>> -- Jack Krupansky
>>
>> -----Original Message----- From: Tolga
>> Sent: Thursday, May 31, 2012 4:55 AM
>> To: solr-user@lucene.apache.org
>> Subject: Hightlighting and excerpt
>>
>> Hi,
>>
>> Two separate things asked in one thread...
>>
>> I am crawling my websites with nutch. When I index them, I'd like to be
>> able to highlight my keyword and display en excerpt containing that
>> keyword. I found a solution with highlight, but what can I about
>> excerpt?
>>
>> Thanks and regards,
>
Re: Hightlighting and excerpt
Posted by Jack Krupansky <ja...@basetechnology.com>.
Yes, that is what highlighting does - it extracts an excerpt and highlights
search terms. You said you have highlighting working, so what else is it
that you need?
Try "/browse" in the Solr example. It does exactly what your example shows.
So, what else is it that you are trying to do? Or if something isn't
working, what specifically isn't working?
-- Jack Krupansky
-----Original Message-----
From: Tolga
Sent: Thursday, May 31, 2012 9:08 AM
To: solr-user@lucene.apache.org
Subject: Re: Hightlighting and excerpt
I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
was stressed?
On 5/31/12 3:54 PM, Jack Krupansky wrote:
> Since highlighting, by definition, does highlight terms in "excerpts"
> (snippets or fragments from a text field), what else is it that you need?
>
> -- Jack Krupansky
>
> -----Original Message----- From: Tolga
> Sent: Thursday, May 31, 2012 4:55 AM
> To: solr-user@lucene.apache.org
> Subject: Hightlighting and excerpt
>
> Hi,
>
> Two separate things asked in one thread...
>
> I am crawling my websites with nutch. When I index them, I'd like to be
> able to highlight my keyword and display en excerpt containing that
> keyword. I found a solution with highlight, but what can I about excerpt?
>
> Thanks and regards,
Re: Hightlighting and excerpt
Posted by Shameema Umer <sh...@gmail.com>.
Hi Togla to get excerpt you should add the fragment size parameter.
hl.fragsize=300
eg:
&hl=true&hl.fl=content&hl.fragsize=300
Thanks
Shameema
On Thu, May 31, 2012 at 7:31 PM, Ahmet Arslan <io...@yahoo.com> wrote:
> > I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
> > was stressed?
>
> Hi Tolga,
>
> I think, you can easily learn the basic using one of the following books.
> http://lucene.apache.org/solr/books.html
>
>
Re: Hightlighting and excerpt
Posted by Ahmet Arslan <io...@yahoo.com>.
> I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
> was stressed?
Hi Tolga,
I think, you can easily learn the basic using one of the following books.
http://lucene.apache.org/solr/books.html
Re: Hightlighting and excerpt
Posted by Tolga <to...@ozses.net>.
I need something like http://cl.ly/2o2E0g0S422d2p1X203h . See how TCMB
was stressed?
On 5/31/12 3:54 PM, Jack Krupansky wrote:
> Since highlighting, by definition, does highlight terms in "excerpts"
> (snippets or fragments from a text field), what else is it that you need?
>
> -- Jack Krupansky
>
> -----Original Message----- From: Tolga
> Sent: Thursday, May 31, 2012 4:55 AM
> To: solr-user@lucene.apache.org
> Subject: Hightlighting and excerpt
>
> Hi,
>
> Two separate things asked in one thread...
>
> I am crawling my websites with nutch. When I index them, I'd like to be
> able to highlight my keyword and display en excerpt containing that
> keyword. I found a solution with highlight, but what can I about excerpt?
>
> Thanks and regards,
Re: Hightlighting and excerpt
Posted by Jack Krupansky <ja...@basetechnology.com>.
Since highlighting, by definition, does highlight terms in "excerpts"
(snippets or fragments from a text field), what else is it that you need?
-- Jack Krupansky
-----Original Message-----
From: Tolga
Sent: Thursday, May 31, 2012 4:55 AM
To: solr-user@lucene.apache.org
Subject: Hightlighting and excerpt
Hi,
Two separate things asked in one thread...
I am crawling my websites with nutch. When I index them, I'd like to be
able to highlight my keyword and display en excerpt containing that
keyword. I found a solution with highlight, but what can I about excerpt?
Thanks and regards,