Right because the mapdb one sits in front of your just indexed data and
doesn't care about what's already in the db.

On Wed, Nov 26, 2014 at 6:33 AM, 3in <[email protected]> wrote:

> thanks Michael
> i found when i use MapDbCachingIndexProvider,the old index isn't loaded,
> but when i use LuceneBatchInserterIndexProvider everything looks right.
>
> 在 2014年11月25日星期二UTC+8上午8时33分40秒,Michael Hunger写道:
>>
>> Good question, I don't know why it is not loaded. Is the index-cache via
>> mapdb still enabled ?
>>
>>
>> On Mon, Nov 24, 2014 at 1:13 PM, 3in <[email protected]> wrote:
>>
>>> i am using BatchInserter to update the graphdb in increments,like this:
>>>
>>>         Config config = Config.convertArgumentsToConfig(args);
>>>         File graphDb = new File(config.getGraphDbDirectory());
>>>         BatchInserter db = createBatchInserter(graphDb, config);
>>>         BatchInserterIndexProvider indexProvider = new
>>> LuceneBatchInserterIndexProvider(db);
>>>         Collection<IndexInfo> indexInfos = config.getIndexInfos();
>>>         if (indexInfos!=null) {
>>>             for (IndexInfo indexInfo : indexInfos) {
>>>                 BatchInserterIndex index = indexInfo.isNodeIndex() ?
>>> nodeIndexFor(indexInfo.indexName, indexInfo.indexType) :
>>> relationshipIndexFor(indexInfo.indexName, indexInfo.indexType);
>>>                 indexes.put(indexInfo.indexName, index);
>>>             }
>>>         }
>>>  ........
>>>       long id = db.createNode(data.getProperties(),labelsFor(labels));
>>>
>>>             for (Map.Entry<String, Map<String, Object>> entry :
>>> data.getIndexData().entrySet()) {
>>>                 final BatchInserterIndex index =
>>> indexFor(entry.getKey());
>>>                 if (index==null)
>>>                     throw new IllegalStateException("Index
>>> "+entry.getKey()+" not configured.");
>>>                 index.add(id, entry.getValue());
>>>             }
>>>             report.dots();
>>>
>>>             if (report.getCount() % BATCH == 0) flushIndexes();
>>>         }
>>>         flushIndexes();
>>>         *// i can search the new add node, but can't search the old
>>> nodes*
>>> *        Long tmp_id = indexes.get("node_auto_index").get("name",
>>> "Selma2").getSingle();*
>>> *        System.out.println("-------------id:" + tmp_id);*
>>>
>>> before i update the graphdb using BatchInserter, the graphdb has 3
>>> million nodes and 4million relationships with node_auto_index。
>>>
>>> i success to add nodes and relationships to graphdb.
>>> and when i flush Indexes , i can search the new node with the
>>> node_auto_index
>>> but i can't search the old 3 million nodes with the node_auto_index.
>>>
>>> isn't the old index loaded in my program? why i can't read it ?
>>>
>>> if i want to search some pattern nodes in the old graghdb , how can i do?
>>>
>>> thank you
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to