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 Hugh Ross <hu...@propylon.com> on 2006/02/06 16:47:42 UTC

Hit Highlighting: To store or not to store?

We have a project with approximately 20,000 documents which require
searching with hit highlighting on the content. The content is of variable
size. My question is which option to take to support hit highlighting:

 

 

1. To store the content as a field in the lucene document and to highlight
hits from there. 

2. To store the path to the document in the lucene document, open up the
document and then run hit highlighting.

 

Is there a "best-practice" for this?

Has anybody tried either of these approaches? 

 

Are there any advantages or drawbacks of either approach?

 

Many thanks,

Hugh


Re: Hit Highlighting: To store or not to store?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Hugh,

Both approaches are certainly in use in various projects.  I  
typically opt for option #1, but that is because it is feasible  
giving the data I work with, and how it is managed.

However, the decision is really based on the size of the text to be  
highlighted and whether it makes sense to store it or just access it  
on the fly.

	Erik


On Feb 6, 2006, at 10:47 AM, Hugh Ross wrote:

> We have a project with approximately 20,000 documents which require
> searching with hit highlighting on the content. The content is of  
> variable
> size. My question is which option to take to support hit highlighting:
>
>
>
>
>
> 1. To store the content as a field in the lucene document and to  
> highlight
> hits from there.
>
> 2. To store the path to the document in the lucene document, open  
> up the
> document and then run hit highlighting.
>
>
>
> Is there a "best-practice" for this?
>
> Has anybody tried either of these approaches?
>
>
>
> Are there any advantages or drawbacks of either approach?
>
>
>
> Many thanks,
>
> Hugh
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org