lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Turnbull <dturnb...@opensourceconnections.com>
Subject Re: Problems with Lucene and Solr
Date Fri, 24 Jan 2014 18:28:59 GMT
Hey Vishnu, I'm trying to understand what you're trying to accomplish
(cc'ing Lucene user group to solicit additional advice)

Are you trying to extract all the terms for a given document? If so, you
might just want to enable term vectors to analyze the index terms for the
document.

-Doug


On Fri, Jan 24, 2014 at 1:56 AM, Vishnu Mishra
<vishnuprasad16@outlook.com>wrote:

> Hi Doug,
>               I have gon through your latest post " Build your own Custom
> Lucene Query and Scorer" and it is really a great post. It helps us to
> understand Lucene scoring and many more things related to the Lucene Query
> scoring. Apart form this, I am facing one big problem while Query Rewriting
> and extracting terms out of it. The problem is, By default lucene rewrite
> query on whole index using IndexReader for e.g.
>
>            Query rewrittenQuery =
> query.rewrite(searcher.getAtomicReader());
>            rewrittenQuery.extractTerms(termSet);
>
> What if I want to rewrite query only of one document using document id in
> place of IndexReader something like
>
>   Query rewrittenQuery = query.rewrite(documentID);
>   rewrittenQuery.extractTerms(termSet);
>
> Is this possible in Lucene or can we do it by some other technique. If you
> have any Idea of doing this then share with me.
>
>
>
> Thanks
>



-- 
Doug Turnbull
Search & Big Data Architect
OpenSource Connections <http://o19s.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message