これは、約1年前に見始めた奇妙なバグです。最初は、開発マシンでたまにしか気づかなかったのですが、今では本番環境に表示され始めており、問題があります。
私たちはUbuntu(11.04)とMono 2.6.7を本番環境で使用し(Mono 2.10.xでも再現できます)、Apache内でmod_monoを使用します。
基本的に、apacheがアプリケーションを起動するときに、SolrNetがsolrサーバーに送信するURL全体を小文字にすることを決定する場合があります(再現が非常に困難です)。アプリケーションがこの状態にある場合、再起動するまでこの状態が続きます(場合によっては、クリアするために数回の再起動が必要になります)。この問題が発生するのを確認せずに、20〜50回以上再起動する場合があります。または時々それは2または3ごとに発生します。
適切なURLは次のようになります。
INFO: [] webapp=/solr path=/select params={sort=Creative.PromotionalScore+desc&start=0&q=*:*&?=&qt=standard&fq={!tag%3DCreative.GalleryReviewStatus}Creative.GalleryReviewStatus:Approved&fq={!tag%3DCreative.SectionIncludedTarget}Creative.SectionIncludedTarget:220358+OR+(NOT+Creative.SectionIncludedTarget:[*+TO+*]+*:*)&fq={!tag%3DActive}Active:true&fq={!tag%3DCreative.ShowInGallery}Creative.ShowInGallery:true&fq={!tag%3DCreative.Size}Creative.Size:"Rectangle"&fq={!tag%3DRecordType}RecordType:FiveToOne.Gallery.Rmx.Creative&rows=12}
不正なURLは次のようになります。
http://solrServer:8080/solr/select?qt=standard&fq=%7b!tag%3dcreative.galleryreviewstatus%7dcreative.galleryreviewstatus%3aapproved&fq=%7b!tag%3dcreative.sectionincludedtarget%7dcreative.sectionincludedtarget%3a306433+or+(not+creative.sectionincludedtarget%3a%5b*+to+*%5d+*%3a*)&fq=%7b!tag%3dactive%7dactive%3atrue&fq=%7b!tag%3dcreative.showingallery%7dcreative.showingallery%3atrue&fq=%7b!tag%3dcreative.size%7dcreative.size%3a%22rectangle%22&fq=%7b!tag%3drecordtype%7drecordtype%3afivetoone.gallery.rmx.creative&sort=creative.promotionalscore+desc&rows=18&start=0&q=*%3a*&?
(最初に、申し訳ありませんが、これら2つのURLはパイプのさまざまな段階から抽出されており、現時点ですべてにアクセスできます。)
不正なURLが送信されると、Solrは致命的な例外をスローし、不明なフィールドについて不平を言います。
HTTP Status 400 - can not sort on undefined field: creative.promotionalscore
type Status report
message can not sort on undefined field: creative.promotionalscore
description The request sent by the client was syntactically incorrect (can not sort on undefined field: creative.promotionalscore).