I work in an environment which has dev, qa, pre and prod servers. I would like to know if there is an automated way I could update an index.
For example, I prototyped a product utilizing RavenDB.
It has a couple of documents:
Account{
int ID,
string Name,
string Phone
}
Contact{
int ID,
string LastName,
string Phone
}
and an Index
SearchDocs
docs.Accounts
.Select(account => new () { Content = new System.Object []{account.Name, account.Phone})
Content: Analyzed
docs.Contacts
.Select(contact => new () { Content = new System.Object []{contact.LastName, contact.Phone})
Content: Analyzed
I created the index through the studio initially. Now that it seems as though we are going ahead with this project, the actual business requirements are to have the documents contain more fields(LastName for contact, Address for account) and then allow the user to search on all the field values. Is there a way to update the index via C# to include those fields as part of the Content so that I could more easily push the changes up through the environments?
Would I use UpdateByIndex? If so, are there any examples how to use it?