[ https://issues.apache.org/jira/browse/LUCENE-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Rutherglen updated LUCENE-1313: ------------------------------------- Attachment: LUCENE-1313.patch {quote} Would you re-use MergePolicy, or make a new RAMMergePolicy? {quote} MergePolicy is used as is with a special IW method that handles merging ram segments for the real directory (which has an issue around merging contiguous segments, can that be relaxed in this case as I don't understand why this is?) The patch is not committable, however I am posting it to show a path that seems to work. It includes test cases for merging in ram and merging to the real directory. * IW.getFlushDirectory is used by internal calls to obtain the directory to flush segments to. This is used in DocumentsWriter related calls. * DocumentsWriter.directory is removed so that methods requiring the directory call IW.getFlushDirectory instead. * IW.setRAMDirectory sets the ram directory to be used. * IW.setRAMMergePolicy sets the merge policy to be used for merging segments on the ram dir. * In IW.updatePendingMerges totalRamUsed is the size of the ram segments + the ram buffer used. If totalRamUsed exceeds the max ram buffer size then IW. updatePendingRamMergesToRealDir is called. * IW. updatePendingRamMergesToRealDir registers a merge of the ram segments to the real directory (currently causes a non-contiguous segments exception) * MergePolicy.OneMerge has a directory attribute used when building the merge.info in _mergeInit. * Test case includes testMergeInRam, testMergeToDisk, testMergeRamExceeded There is one error that occurs regularly in testMergeRamExceeded {code} MergePolicy selected non-contiguous segments to merge (_bo:cx83 _bm:cx4 _bn:cx2 _bl:cx1->_bj _bp:cx1->_bp _bq:cx1->_bp _c2:cx1->_c2 _c3:cx1->_c2 _c4:cx1->_c2 vs _5x:c120 _6a:c8 _6t:c11 _bo:cx83** _bm:cx4** _bn:cx2** _bl:cx1->_bj** _bp:cx1->_bp** _bq:cx1->_bp** _c1:c10 _c2:cx1->_c2** _c3:cx1->_c2** _c4:cx1->_c2**), which IndexWriter (currently) cannot handle {code} > Realtime Search > --------------- > > Key: LUCENE-1313 > URL: https://issues.apache.org/jira/browse/LUCENE-1313 > Project: Lucene - Java > Issue Type: New Feature > Components: Index > Affects Versions: 2.4.1 > Reporter: Jason Rutherglen > Priority: Minor > Fix For: 2.9 > > Attachments: LUCENE-1313.jar, LUCENE-1313.patch, LUCENE-1313.patch, > LUCENE-1313.patch, LUCENE-1313.patch, LUCENE-1313.patch, lucene-1313.patch, > lucene-1313.patch, lucene-1313.patch, lucene-1313.patch > > > Realtime search with transactional semantics. > Possible future directions: > * Optimistic concurrency > * Replication > Encoding each transaction into a set of bytes by writing to a RAMDirectory > enables replication. It is difficult to replicate using other methods > because while the document may easily be serialized, the analyzer cannot. > I think this issue can hold realtime benchmarks which include indexing and > searching concurrently. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org