Hi Ed
The Fields property should be used but I can see it's not wired up in
the ExtractCommand this is a bug and should be easy to fix I'll try to
have a look at it this weekend.
Regarding using it with your existing dto I'm actually doing something
similar in my app but the way I've done it is to just call Solr and
get the extracted results only and then put it into my dto in a
separate property called Doc.
I've attached a extract of the documentation I was working on below if
you have a look it should explain how to do this.
Naz
---------------------------------------------------------
Extract Only
Solr can return the extracted content from Tika without indexing the
document. This can be returned as text or XHTML. This feature is
useful for when you want to leverage Solr for extraction but use the
result in an existing separate index or elsewhere. By default if
ExtractOnly is set to true the output is XHTML unless you specify
another ExtractType.
<code>
solr.Add(new ExtractParameters(“1”, File.OpenRead(“C:\MyDocument.pdf”)
{
ExtractOnly = true,
ExtractType = ExtractType.Text
});
</code>
On Mar 18, 2:32 pm, Ed <
mysterydev...@gmail.com> wrote:
> Great work on SolrNet and the new ExtractingRequestHandler, thanks
> Mauricio and Naz!
>
> A couple of questions - I'm new to this code so please excuse me if
> I'm missing something obvious.
>
> I want to call ISolrOperations<T>.Extract() and pass in some fields to
> accompany the metadata and content that the ExtractingRequestHandler
> pulls out of my binary file.
>
> As far as I can tell, the ExtractParams.Fields property isn't being
> used. I would expect it to add literal.* parameters for each of the
> fields and include them in the call to Solr's
> ExtractingRequestHandler. But ExtractCommand seems to be ignoring the
> ExtractParams.Fields property. I can see it wouldn't be hard to add
> this into ExtractCommand.ConvertToQueryParameters() but am I missing
> something that's already there?
>
> Even better, I would like to call an overload of
> ISolrOperations<MyProduct>.Extract() which takes my MyProduct DTO
> which has been decorated with [SolrField] attribs as per your mapping
> example athttp://
code.google.com/p/solrnet/wiki/Mapping. It would