Creating and Publishing Document via Code but not Searchable via Razor - 4.7.11
I've got something rather simple in that a user is voting for something on the site and a part of this vote is capturing the user's email. Creating the Document is straightforward:
DocumentType dt = DocumentType.GetByAlias("VideoVote");
User author = new User(0);
Document doc = Document.MakeNew(whichvote, dt, author, Model.Id);
doc.getProperty("voteChoice").Value = whichvote;
doc.getProperty("youtubeCode").Value = youtube;
doc.getProperty("email").Value = email;
doc.getProperty("ip").Value = ip; // defined prior
doc.Template = 4407; // need to change on prod
doc.Save();
doc.Publish(author);
The document is created HOWEVER it is not searchable like this:
If I go into the backend and save and publish manually it will show up in that query above.. Can somone help track down what I need to do so that after creating the node I can search for it?
Creating and Publishing Document via Code but not Searchable via Razor - 4.7.11
I've got something rather simple in that a user is voting for something on the site and a part of this vote is capturing the user's email. Creating the Document is straightforward:
The document is created HOWEVER it is not searchable like this:
If I go into the backend and save and publish manually it will show up in that query above.. Can somone help track down what I need to do so that after creating the node I can search for it?
Too many long days.. I left off:
is working on a reply...