You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Aaron Whittier (JIRA)" <ji...@apache.org> on 2008/08/27 23:03:44 UTC

[jira] Created: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
--------------------------------------------------------------------------------------------------

                 Key: SOLR-733
                 URL: https://issues.apache.org/jira/browse/SOLR-733
             Project: Solr
          Issue Type: Wish
    Affects Versions: 1.3
            Reporter: Aaron Whittier
            Priority: Minor
             Fix For: 1.3


We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626668#action_12626668 ] 

Shalin Shekhar Mangar commented on SOLR-733:
--------------------------------------------

I think that is possible with UpdateRequestProcessor.

Instead of adding a custom tag to the XML, add them as normal fields (metadata1, 2, ...) which will be added to SolrInputDocument. In the processAdd method you will get access to the value by using SolrInputDocument#getValue(String field). Use them in whatever way you want, remove them from SolrInputDocument and add the final processed text to a new field using SolrInputDocument#addField and finally pass on for indexing by calling super.processAdd(SolrInputDocument).

> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626324#action_12626324 ] 

Brian Whitman commented on SOLR-733:
------------------------------------

We also had to do this to write a requesthandler that maintains original dates on overwrite adds. But then I found this: http://wiki.apache.org/solr/UpdateRequestProcessor - does the updateRequestProcessor solve your problem?



> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>             Fix For: 1.3
>
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-733:
--------------------------

    Fix Version/s:     (was: 1.3)

this is an improvement, not a bug, so even if someone provides a patch we're not going to try and squeeze it in for 1.3.

> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Aaron Whittier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Whittier resolved SOLR-733.
---------------------------------

    Resolution: Fixed

Ah, fantastic - that works very well. Thanks!

> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Aaron Whittier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626658#action_12626658 ] 

aaronwhittier edited comment on SOLR-733 at 8/28/08 10:26 AM:
---------------------------------------------------------------

I don't think the UpdateRequestProcessor will let me do what I want. Let me describe what we're trying to do - maybe I can do it easily without cloning XmlUpdateRequestHandler.

We want to add additional data to the XML <doc> tag, a <RichContent> tag which has a couple attributes, and whose contents are textual data. We want to translate this data into different text and then attach it to one of the lucene fields in the SolrInputDocument, which can then be processed normally. What I want, I think, is to be able to override the readDoc() method in XmlUpdateRequestHandler.

Does that make sense? I could easily be missing a simple solution, as I'm new to Solr.

      was (Author: aaronwhittier):
    I don't think the UpdateRequestProcessor will let me do what I want. Let me describe what we're trying to do - maybe I can do it easily without cloning XmlUpdateRequestHandler.

We want to add additional data to the XML <doc> tag, a <RichContent> tag which has a couple attributes, and whose contents are textual data. We want to translate this data into text and then attach it to one of the lucene fields in the SolrInputDocument, which can then be processed normally. What I want, I think, is to be able to override the readDoc() method in XmlUpdateRequestHandler.

Does that make sense? I could easily be missing a simple solution, as I'm new to Solr.
  
> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-733) Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler

Posted by "Aaron Whittier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626658#action_12626658 ] 

Aaron Whittier commented on SOLR-733:
-------------------------------------

I don't think the UpdateRequestProcessor will let me do what I want. Let me describe what we're trying to do - maybe I can do it easily without cloning XmlUpdateRequestHandler.

We want to add additional data to the XML <doc> tag, a <RichContent> tag which has a couple attributes, and whose contents are textual data. We want to translate this data into text and then attach it to one of the lucene fields in the SolrInputDocument, which can then be processed normally. What I want, I think, is to be able to override the readDoc() method in XmlUpdateRequestHandler.

Does that make sense? I could easily be missing a simple solution, as I'm new to Solr.

> Refactor or expose methods processDelete(), processUpdate(), readDoc() in XmlUpdateRequestHandler 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-733
>                 URL: https://issues.apache.org/jira/browse/SOLR-733
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 1.3
>            Reporter: Aaron Whittier
>            Priority: Minor
>
> We are extending the functionality of XmlUpdateRequestHandler in our application with a couple simple changes, but because the processDelete(), processUpdate(), readDoc() are package-private, we've had to copy most of XmlUpdateRequestHandler, whether we changed any parts or not. Can those be made more pluggable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.