Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update specific field on SOLR index

Tags:

solr

lucene

rdbms

I want to using solr for search on articles

I have 3 table:

  1. Group (id , group name)
  2. ArticleBase (id, groupId, some other field)
  3. Article(id, articleBaseId, title, date, ...)

in solr schema.xml file i just define all article field that mixed with ArticleBase table (for use one index on solr) like this: (id, articleBaseId, groupId, ...)

problem: Admin want to change group (ArticleBase), therefore i must update (or replace) all indexed article in solr. right ?
can i update groupId only in solr index ?

have any solution ?

Note:Article table contains more than 200 million article, and i using solr for index only (not store any field data except article id)

like image 309
Hamid Avatar asked Jan 09 '10 08:01

Hamid


1 Answers

Solr does not support updating individual fields yet, but there is a JIRA issue about this (almost 3 years old as of this writing).

Until this is implemented, you have to update the whole document.

UPDATE: as of Solr 4+ this is implemented, here's the documentation.

like image 138
Mauricio Scheffer Avatar answered Nov 30 '22 22:11

Mauricio Scheffer