这是我们大约一年前开始看到的一个奇怪的错误。起初,我偶尔会在我的开发机器上注意到它,但现在它已经开始出现在生产中,这是有问题的。
我们在使用mod_mono的apache中使用Ubuntu(11.04)和Mono 2.6.7(我也可以使用Mono 2.10.x进行重新编译)。
基本上,有时(非常难以重现),当apache启动应用程序时,SolrNet决定将它传输到solr服务器的整个URL小写。如果应用程序处于此状态,它将一直保持这种状态,直到它重新启动(有时需要重新启动几次才能清除。)我们可能会重新启动20 - 50或更多,而不会出现此问题。或者有时会每2或3次发生一次。
一个好的网址看起来像这样:
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}
坏网址看起来像这样:
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*&?
(首先,我道歉,这两个网址是从管道的不同阶段提取的,我现在都可以访问。)
当提交了坏网址时,索尔抛出一个致命的例外,抱怨一个未知的字段:
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).