[
https://issues.apache.org/jira/browse/SOLR-3432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268019#comment-13268019
]
Hoss Man commented on SOLR-3432:
--------------------------------
In r1333704 i refactored a few of the newer tests that expect the _version_
field to use schema15.xml instead of schema12.xml, so i could remove _version_
from schema12.xml.
I thought that would make it trivial to attach a patch for
DirectupdateHandlerTest demonstrating the bug, but to my surprise even when i
updated that test to do some deleteByQuery commands, the test still passes (see
r1333738).
I'm at a loss to understand why the newly updated test passes, but the steps
above fail on the example.
> deleteByQuery silently ignored unless {{_version_}} field exists in schema
> ---------------------------------------------------------------------------
>
> Key: SOLR-3432
> URL: https://issues.apache.org/jira/browse/SOLR-3432
> Project: Solr
> Issue Type: Bug
> Environment: Tomcat 7
> Reporter: David
> Assignee: Yonik Seeley
> Priority: Blocker
> Fix For: 4.0
>
> Attachments: schema.xml, solr.xml, solrconfig.xml, web.xml
>
>
> deleteByQuery is silently ignored if there is no {{\_version\_}} field in the
> schema.xml
> To reproduce:
> * comment out {{\_version\_}} in example schema
> * {{java -jar start.jar}}
> * {{java -Ddata=args -jar post.jar '<add><doc><field
> name="id">HOSS</field></doc></add>'}}
> * {{java -Ddata=args -jar post.jar '<delete><query>id:HOSS</query></delete>'}}
> ** or: {{java -Ddata=args -jar post.jar
> '<delete><query>\*:\*</query></delete>'}}
> Note in the logs that SolrCore logs the deleteByQuery, but there is no log of
> it executing...
> {noformat}
> May 3, 2012 4:36:24 PM org.apache.solr.update.processor.LogUpdateProcessor
> finish
> INFO: [collection1] webapp=/solr path=/update params={} {deleteByQuery=*:*} 0
> 41
> {noformat}
> Workarround: add this ield to your schema.xml...
> {code}
> <field name="_version_" type="long" indexed="true" stored="true"/>
> {code}
--
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: [email protected]
For additional commands, e-mail: [email protected]