linq complicated blobs


i have request list meta information request also request calm blob.



then i lucene.net query documents; relapse gives me list guids request list also twin fields containing highlighted html versions request name mislay hunt keywords highlighted.



then i linq join outcome request list fields list arrangement hunt result. ridiculous thing linq tries bucket blob request nonetheless it's used join.



i'm pondering twin options, conjunction i like:




  • move blob new list couple 1-1 request table. i don't since discount linq forcing me change db structure.

  • add new dbml "litedocument" list mislay blob request list dbml; i don't since i have twin places say request list change.



i wondering there improved proceed this? here formula snippets:



    open category lucenesearchresult
{
open guid documentid { get; set; }
open twine formatteddocumentfilename { get; set; }
open twine formatteddocumentextract { get; set; }
}


and



    open ilist search(string searchphrase, guid? productid)
{
searchphrase = preparesearchphrasewiththesaurus(searchphrase);
var outcome = runlucenequery(searchphrase, productid);

var dc = new chinahcpdatacontext();
var docs =
r result
join d dc.documents r.documentid equals d.documentid
select
new
{
d.documentid,
tradenameen = d.tradeproduct != zero ? d.tradeproduct.tradenameen : "",
tradenamezh = d.tradeproduct != zero ? d.tradeproduct.tradenamezh : "",
d.documentfilename,
d.inserteddateutc,
d.size,
documentdisplaytext = r.formatteddocumentfilename,
documentselectionreason = r.formatteddocumentextract
};

relapse docs.tolist();
}


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?