LINQ value.contains function error


  • m facing the following error while using LINQ with RavenDB

    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.

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

    plz help me solve my problem
    Tuesday, October 29, 2013 10:42 AM


  • What happens if you try the query this way.

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


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, October 29, 2013 7:03 PM