You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (Created) (JIRA)" <ji...@apache.org> on 2011/12/22 10:36:38 UTC

[jira] [Created] (LUCENE-3665) Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Make WeightedSpanTermExtractor extensible to handle custom query implemenations
-------------------------------------------------------------------------------

                 Key: LUCENE-3665
                 URL: https://issues.apache.org/jira/browse/LUCENE-3665
             Project: Lucene - Java
          Issue Type: Improvement
          Components: modules/highlighter
    Affects Versions: 3.5
            Reporter: Simon Willnauer
            Priority: Minor
             Fix For: 3.6, 4.0


Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

--
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

        

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


[jira] [Commented] (LUCENE-3665) Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Posted by "Mark Miller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175736#comment-13175736 ] 

Mark Miller commented on LUCENE-3665:
-------------------------------------

+1 - only looked at the patch, but looks good to me.
                
> Make WeightedSpanTermExtractor extensible to handle custom query implemenations
> -------------------------------------------------------------------------------
>
>                 Key: LUCENE-3665
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3665
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 3.5
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3665.patch
>
>
> Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

--
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

        

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


[jira] [Updated] (LUCENE-3665) Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Posted by "Simon Willnauer (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer updated LUCENE-3665:
------------------------------------

    Attachment: LUCENE-3665.patch

here is a patch including a testcases. I simply opened up the API a little and added two methods for subclassing.
                
> Make WeightedSpanTermExtractor extensible to handle custom query implemenations
> -------------------------------------------------------------------------------
>
>                 Key: LUCENE-3665
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3665
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 3.5
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3665.patch
>
>
> Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

--
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

        

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


[jira] [Commented] (LUCENE-3665) Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Posted by "Simon Willnauer (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175717#comment-13175717 ] 

Simon Willnauer commented on LUCENE-3665:
-----------------------------------------

I will commit this soon if nobody objects
                
> Make WeightedSpanTermExtractor extensible to handle custom query implemenations
> -------------------------------------------------------------------------------
>
>                 Key: LUCENE-3665
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3665
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 3.5
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3665.patch
>
>
> Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

--
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

        

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


[jira] [Resolved] (LUCENE-3665) Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Posted by "Simon Willnauer (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer resolved LUCENE-3665.
-------------------------------------

    Resolution: Fixed
      Assignee: Simon Willnauer
    
> Make WeightedSpanTermExtractor extensible to handle custom query implemenations
> -------------------------------------------------------------------------------
>
>                 Key: LUCENE-3665
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3665
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 3.5
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3665.patch
>
>
> Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

--
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

        

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