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 Stephan Grimm <sg...@webde-ag.de> on 2002/10/15 10:59:14 UTC

retrieving term positions during the search process

Is there a way to retrieve the original term positions during the search
process invoked by Searcher.search()? In addition to the documents and their
scores we want to have access to the positions of the terms found in order
to do a highlighting. We don't want to perform a second iteration to search
the query terms in the document again for they must be contained in the
index in some way.

We would like to do something like
	TermPositions[] hits.getHitQueryTermPositions(int doc)
returning the term positions for each query term in the original document.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: retrieving term positions during the search process

Posted by Doug Cutting <cu...@lucene.com>.
Stephan Grimm wrote:
> Is there a way to retrieve the original term positions during the search
> process invoked by Searcher.search()? In addition to the documents and their
> scores we want to have access to the positions of the terms found in order
> to do a highlighting. We don't want to perform a second iteration to search
> the query terms in the document again for they must be contained in the
> index in some way.
> 
> We would like to do something like
> 	TermPositions[] hits.getHitQueryTermPositions(int doc)
> returning the term positions for each query term in the original document.


See 
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=lucene-dev@jakarta.apache.org&msgId=493352

Doug


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: retrieving term positions during the search process

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I think somebody asked this exact question 5-10 days ago.
Check the archives at http://nagoya.apache.org/

Otis

--- Stephan Grimm <sg...@webde-ag.de> wrote:
> Is there a way to retrieve the original term positions during the
> search
> process invoked by Searcher.search()? In addition to the documents
> and their
> scores we want to have access to the positions of the terms found in
> order
> to do a highlighting. We don't want to perform a second iteration to
> search
> the query terms in the document again for they must be contained in
> the
> index in some way.
> 
> We would like to do something like
> 	TermPositions[] hits.getHitQueryTermPositions(int doc)
> returning the term positions for each query term in the original
> document.
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>