简体   繁体   English

在SOLR中完全导入NEW索引后保留OLD索引。

[英]Retaining OLD index after doing full-import of NEW Index in SOLR..?

I am using SOLR 3.5.0..!! 我正在使用SOLR 3.5.0 .. !!

I have made two Indexes : " Cars " and " Vendors " 我做了两个索引:“ 汽车 ”和“ 供应商

Both indexes fetch results from the Database and populate Documents..!! 两个索引都从数据库中获取结果并填充文档.. !!

My request handlers are as follows : 我的请求处理程序如下:

    <requestHandler name="/selectCars" class="org.apache.solr.handler.dataimport.DataImportHandler">
      <lst name="defaults">
        <str name="config">solr/jcoreDocuments/CarsConfig.xml</str>
      </lst>
    </requestHandler>

     <requestHandler name="/selectVendors" class="org.apache.solr.handler.dataimport.DataImportHandler">
        <lst name="defaults">
        <str name="config">solr/jcoreDocuments/vendorConfig.xml</str>
        </lst>
     </requestHandler>

Now when i hit the following URL : 现在,当我点击以下URL时:

http://localhost:8983/solr/selectVendors?command=full-import

It fetches the corresponding 47531 documents..!! 它获取相应的47531文档.. !!

when i hit : http://localhost:8983/solr/select?q=*:* .... It shows that i have 47531 documents available..!! 当我点击时: http://localhost:8983/solr/select?q=*:* ....这表明我有47531文档可用.. !! (THATS CORRECT) (正确的)

Now when i want to fetch my " Cars " documents, but retaining the " Vendor " documents..I hit the following URL : 现在,当我想获取“ 汽车 ”文档但保留“ 供应商 ”文档时。我点击以下URL:

http://localhost:8983/solr/selectCars?command=full-import&clean=false

It shows that it has fetched corresponding 802 documents..!! 它表明它已经获取了802相应的文件。

Now when i hit http://localhost:8983/solr/select?q=*:* ....I still have 47531 documents available ..!! 现在当我点击http://localhost:8983/solr/select?q=*:* ....我仍然有47531文档可用.. !!

(But now it contains 802 NEW - Cars documents and REDUCED 46729 Vendors documents ) (但现在它包含802 NEW - Cars文档和REDUCED 46729 Vendors文档)


Note : After fetching two Indexes the total documents should be 47531 + 802 = 48333 注意 :获取两个索引后,总文档数应为47531 + 802 = 48333


How is it possible...Am i missing something..?? 怎么可能...我错过了什么吗?

When you are reindexing data with the same ID would be "updated" that might mean your vendors would become cars. 当您重新索引具有相同ID的数据时,将“更新”,这可能意味着您的供应商将成为汽车。 In your dataimport conf change id to they will be unique for vendors and cars 在dataimport conf中,更改ID对供应商和汽车来说是唯一的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM