[
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: [email protected]
For additional commands, e-mail: [email protected]