Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CA149987 for ; Fri, 2 Mar 2012 15:58:24 +0000 (UTC) Received: (qmail 95532 invoked by uid 500); 2 Mar 2012 15:58:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 95478 invoked by uid 500); 2 Mar 2012 15:58:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 95465 invoked by uid 99); 2 Mar 2012 15:58:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 15:58:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 15:58:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 42B6A5FDE for ; Fri, 2 Mar 2012 15:57:58 +0000 (UTC) Date: Fri, 2 Mar 2012 15:57:58 +0000 (UTC) From: "Per Steffensen (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <118708259.12409.1330703878274.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1354731664.28175.1330439986206.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-3173) Database semantics - insert and update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221008#comment-13221008 ] Per Steffensen commented on SOLR-3173: -------------------------------------- Hi again Have most of it coded by now. No tests yet though. Simply wasnt able to create tests before I knew what kind changes to do and where to do them. Yonik Seeley, I really hope for your help on the best way (quickest), from inside DirectUpdateHandler2 (e.g. addDoc method), to realtime-get the newest _version_ number of the document in cmd (using its idField) - basically getRealtimeVersion(id) in comment above. Please help with some code or a few hints. I would also really like you to confirm or correct me on a) through d) in comment above. I have been playing a little with some code to get the newest document with same uniqueKey (idField) value as the document in cmd: SearchComponent realTimeGetComponent = core.getSearchComponent(RealTimeGetComponent.COMPONENT_NAME); SolrQueryRequest req = new SolrQueryRequestBase(core, ???) {}; ResponseBuilder rb = ???; realTimeGetComponent.prepare(rb); realTimeGetComponent.process(rb); long currentVersion = rb.???; But I am in doubt if there is a more direct way than getting the SearchComponent from the core and use that? And exactly what to put in as SolrParams? How to create a ResponseBuilder from req? If I am allowed to just call prepare and process on a SearchComponent, or if that has to be handled by some framework that does more? How to get the currentVersion from rb after processing the query? In general about exactly how to do? I will make it work, but you can really save me some time, and help me get i right and as efficient as possible in the first go. Thanks in advance! Regards, Per Steffensen > Database semantics - insert and update > -------------------------------------- > > Key: SOLR-3173 > URL: https://issues.apache.org/jira/browse/SOLR-3173 > Project: Solr > Issue Type: New Feature > Components: update > Affects Versions: 3.5 > Environment: All > Reporter: Per Steffensen > Assignee: Per Steffensen > Labels: RDBMS, insert, nosql, uniqueKey, update > Fix For: 4.0 > > Original Estimate: 168h > Remaining Estimate: 168h > > In order increase the ability of Solr to be used as a NoSql database (lots of concurrent inserts, updates, deletes and queries in the entire lifetime of the index) instead of just a search index (first: everything indexed (in one thread), after: only queries), I would like Solr to support the following features inspired by RDBMSs and other NoSql databases. > * Given a solr-core with a schema containing a uniqueKey-field "uniqueField" and a document Dold, when trying to INSERT a new document Dnew where Dold.uniqueField is equal to Dnew.uniqueField, then I want a DocumentAlredyExists error. If no such document Dold exists I want Dnew indexed into the solr-core. > * Given a solr-core with a schema containing a uniqueKey-field "uniqueField" and a document Dold, when trying to UPDATE a document Dnew where Dold.uniqueField is equal to Dnew.uniqueField I want Dold deleted from and Dnew added to the index (just as it is today).If no such document Dold exists I want nothing to happen (Dnew is not added to the index) > The essence of this issue is to be able to state your intent (insert or update) and have slightly different semantics (from each other and the existing update) depending on you intent. > The functionality provided by this issue is only really meaningfull when you run with "updateLog" activated. > This issue might be solved more or less at the same time as SOLR-3178, and only one single SVN patch might be given to cover both issues. -- 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