Hi Mauricio,I am trying to use SolrNet (0.4.0.2002) to extract the contents of a PDF file. The PDF file is on a server and I am reading it into a memory stream, using the URL.What should be the "resourceName" param in this case for ExtractParameters? I could not find any examples for using the Extract method using Streams.C# code :--HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
WebResponse response = request.GetResponse();
byte[] b = null;
using (Stream stream = response.GetResponseStream())
using (MemoryStream ms = new MemoryStream())
{
int count = 0;
do
{
byte[] buf = new byte[1024];
count = stream.Read(buf, 0, 1024);
ms.Write(buf, 0, count);
} while (stream.CanRead && count > 0);
b = ms.ToArray();
ExtractParameters exParams = new ExtractParameters(ms, "doc1", "???")
ExtractOnly = true,
ExtractFormat = ExtractFormat.Text,
StreamType = "application/pdf"
};
var content = solr.Extract(exParams);Thanks.--Jay
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/solrnet/-/9nxiNzgRj5QJ.
To post to this group, send email to sol...@googlegroups.com.
To unsubscribe from this group, send email to solrnet+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrnet?hl=en.
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">1</int>
</lst>
<lst name="error">
<str name="msg">missing content stream</str>
<int name="code">40
0</int>
</lst>
</response>
To view this discussion on the web visit https://groups.google.com/d/msg/solrnet/-/EIr7PfgOjTMJ.