Multiple Indexes in same Solr Core..?

后端 未结 2 1310
傲寒
傲寒 2021-01-06 11:33

I am using Apache Solr..I have the following Scenario.. :

I have Two table in my PostGreSQL database. One is \"Cars\". Other is \"D

2条回答
  •  遥遥无期
    2021-01-06 12:07

    if the fields are the same for both cars and dealers, you could use one index with an object defined like so:

    
      
      
       
      
      
    
    

    this will work for both cars and dealers (so you don't need to have 2 indexes) and you'll use the "type" field to sort out if you want a "dealer" or a "car" (i'm using the same system to filter out similar types of objects with only a minor "semanthical" difference)

    also you'll need to add stored="true" to the fields you want to retrieve, or you'll be only able to use them for searching (hence that index="true")

提交回复
热议问题