2

我在使用包含 LINQ 查询的函数时遇到错误

发生以下错误

Contains is not supported, doing a substring match over a text field is a very 
slow operation, and is not allowed using the Linq API.
The recommended method is to use full text search (mark the field as Analyzed and
use the Search() method to query it.

这是我的查询

query = from u in Session.Query<Article>() where u.Tags.Contains(tags) orderby u.CreationDate descending select 

StartWith/EndsWith工作正常,但不能完全满足我的要求

4

1 回答 1

2

由于错误状态,包含将不起作用,您需要使用已分析字段。您可以从这里开始:http ://ravendb.net/docs/client-api/querying/static-indexes/configuring-index-options

于 2013-10-29T10:52:32.527 回答