I currently have solr 5.5.0 installed on a Windows 7 machine.
I am trying to get a project working that was built by a dev who recently left our company. This was dropped in my lap and I have no prior experience with solr so I am stumbling along trying to figure it out.
The problem I am having is that when I upload a file, it does not seem to be extracting custom fields that were defined like this:
public class SolrIndexFile
{
[SolrUniqueKey("id")]
public string Id { get; set; }
[SolrField("attr_resourcename")]
public string Path { get; set; }
[SolrField("extension_s")]
public string Extension { get; set; }
[SolrField("bytes_s")]
public string Bytes { get; set; }
}
At first I thought I needed to specify a schema.xml but as I read more (and solr renamed it to schema.xml.bak) I figured out that now solr5 is using the managed-schema.
Then I thought I needed to manually add those field names. But then I saw the conventions (albiet I think I saw it in the schema.xml file) but it seems like those conventions should still hold true.
So now I am back to square one trying to figure out how to get those fields into the extract. Here is the code that actually uploads the file.
using (var fileStream = File.OpenRead(tmp))
{
_solr.Extract(new ExtractParameters(fileStream, index.Id, index.Path)
{
ExtractFormat = ExtractFormat.Text,
ExtractOnly = false,
AutoCommit = true
});
}
tmp is the file path to what I am uploading.
Any help is appreciated!