You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Joern Kottmann (Commented) (JIRA)" <de...@uima.apache.org> on 2012/01/13 10:35:39 UTC
[jira] [Commented] (UIMA-2327) Prospective Search in Lucas
[ https://issues.apache.org/jira/browse/UIMA-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185518#comment-13185518 ]
Joern Kottmann commented on UIMA-2327:
--------------------------------------
Sounds like a bug to me. Do you want to provide a patch?
JavaDoc is here:
http://lucene.apache.org/java/2_9_1/api/contrib-highlighter/org/apache/lucene/search/highlight/QueryScorer.html#init(org.apache.lucene.analysis.TokenStream)
There it says it could also return null, in this case we need to continue using the existing TokenStream.
> Prospective Search in Lucas
> ---------------------------
>
> Key: UIMA-2327
> URL: https://issues.apache.org/jira/browse/UIMA-2327
> Project: UIMA
> Issue Type: Question
> Components: Sandbox-Lucas
> Affects Versions: 2.3.1Addons
> Reporter: Yanna Kang
>
> I would like to use UIMA Lucas to perform a prospective search. When the search query is a phrase query, ProspectiveSearchAE.process() could not find the matching tokens even if there are matches in the document. It worked well for boolean queries.
> In org.apache.uima.lucas.ProspectiveSearchAE line 189, the original code is scorer.init(tokenStream). I suspect that we need to do tokenStream = scorer.init(tokenStream). The original tokenStream was consumed in the scorer.init(tokenStream). If we want to consume it again (as the code did), we need to use the returned tokenStream, which has been reset to the beginning.
> I am a newbie to Lucas. Please correct me if I am wrong.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira