简体   繁体   中英

Solr Indexing table and adding new field

I am a newbie on Solr and looking to added a new filter to the Solr index.

I am reviewing code that send a query object where one of its properties 'FacetFields' is called status

and after the following line is called

SolrSearch.ExecuteQuery(query);

Here is the result for FacetResults - status

For Status, it always return 3 counts, which are

0 RecordCount: 100 Value: 0 1 RecordCount: 75 Value: 1 2 RecordCount: 50 Value: 2

for this returning recordset, it found how many record type for each type ie the Value. In the c# code,

I am assuming there is only 3 types denoted by int value 1,2,3 for of Type Status.

Here are my questions about Solr:

Solr index a table and the results is saved to a file in the data folder, correct?

I am assuming the 3 Status types were originally in a table that was indexed by Solr, so if I want to add a new Status type like Active or Closed, I need to add to the original table which Solr is indexing correct?

Looking at the Solr webpanel and at the items listed under Core, how can I find out which tables are index under a specific Core?

  1. The index is indeed stored in the data folder.
  2. You can add it to the original table if possible or if it's
    something calculated using existing contents of the table, you can
    calculate the status type value and assign it to the field using a
    scriptTransformer.
  3. You are mentioning a table, I'm assuming it's a database table and that your solr is using DataImportHandler. If so, you should be able to find the query specific to the core in the (config)xml file mentioned in your dataimport request handler in solrconfig.xml in the instanceDir of the specific core.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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