You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Clandes Tino <cl...@yahoo.co.uk> on 2004/03/02 19:19:28 UTC
Highlighting problem
Hi all,
I have incorporated highlighting package
(http://home.clara.net/markharwood/lucene/highlight.htm)
but I am worried about the following issue.
If I want to display "body" field contents best
segments, containing term from query highlighted, I
have to define Field "body" as Stored.
So, complete process would be like this:
Index related work:
1. parse uploaded document into temp ASCII file
2. read ASCII file and append its content to String
3. make Field as Text(String name, String value)
Search related work:
1. Retrieve field body String value from the hit
(again - only way to do this - as I have understood
is to declare Field body as Stored)
2. pass the String value to Highlighter methods.
Besides that in Lucene FAQ I have read that body
fields are not good candidates to be declared as
Stored. Index size is one obvious reason, but I am
wondering, how it implies Lucene search performance in
general?
Has somebody an idea how to include highlight
functionality in Unstored Field?
Regards and thanx in advance
Milan
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Highlighting problem
Posted by Matt Tucker <ma...@jivesoftware.com>.
Clandes,
I'm not sure what the "body" field is that you're indexing. If it's a
database record, one option may be to store the database primary key for
the record as a field value -- basically a document ID. In that case,
you would do the search and get back matching document ID's. You could
then pull the bodies from the database and send them through the
hilighting routine without ever needing to store the full body value in
Lucene.
Regards,
Matt
Clandes Tino wrote:
> Hi all,
> I have incorporated highlighting package
> (http://home.clara.net/markharwood/lucene/highlight.htm)
> but I am worried about the following issue.
>
> If I want to display "body" field content’s best
> segments, containing term from query highlighted, I
> have to define Field "body" as Stored.
>
> So, complete process would be like this:
> Index related work:
> 1. parse uploaded document into temp ASCII file
> 2. read ASCII file and append its content to String
> 3. make Field as Text(String name, String value)
>
> Search related work:
> 1. Retrieve field “body” String value from the hit
> (again - only way to do this - as I have understood –
> is to declare Field “body” as Stored)
> 2. pass the String value to Highlighter methods.
>
> Besides that in Lucene FAQ I have read that “body”
> fields are not good candidates to be declared as
> Stored. Index size is one obvious reason, but I am
> wondering, how it implies Lucene search performance in
> general?
>
> Has somebody an idea how to include highlight
> functionality in Unstored Field?
>
> Regards and thanx in advance
> Milan
>
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Highlighting problem
Posted by Vladimir Yuryev <vy...@rambler.ru>.
Hi!
For you Mark Harwood has made a file HighlightExtractorTest in which
the principle of work Highlight is specified.
Besides by replacing tags <B> for example on < B style = "
color:black; background-color:#ffff66 " >, receive yellow Highlight.
If to apply conformity found word and color, it will turn out as at
Google and etc.
Best regards,
Vladimir.
On Tue, 2 Mar 2004 18:19:28 +0000 (GMT)
Clandes Tino <cl...@yahoo.co.uk> wrote:
>Hi all,
>I have incorporated highlighting package
>(http://home.clara.net/markharwood/lucene/highlight.htm)
>but I am worried about the following issue.
>
>If I want to display "body" field content?s best
>segments, containing term from query highlighted, I
>have to define Field "body" as Stored.
>
>So, complete process would be like this:
>Index related work:
>1. parse uploaded document into temp ASCII file
>2. read ASCII file and append its content to String
>3. make Field as Text(String name, String value)
>
>Search related work:
>1. Retrieve field ?body? String value from the hit
>(again - only way to do this - as I have understood ?
>is to declare Field ?body? as Stored)
>2. pass the String value to Highlighter methods.
>
>Besides that in Lucene FAQ I have read that ?body?
>fields are not good candidates to be declared as
>Stored. Index size is one obvious reason, but I am
>wondering, how it implies Lucene search performance in
>general?
>
>Has somebody an idea how to include highlight
>functionality in Unstored Field?
>
>Regards and thanx in advance
>Milan
>
>
>
>
>
>
>___________________________________________________________
>Yahoo! Messenger - Communicate instantly..."Ping"
>your friends today! Download Messenger Now
>http://uk.messenger.yahoo.com/download/index.html
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org