Skip to content

Full-text search support for EF6 #999

Closed

Description

@rwasef1830

Hello,
Is something like http://blog.devart.com/using-postgresql-full-text-search-in-entity-framework.html possible using npgsql ?

I couldn't find anything in the source relating to that, is there a workaround or way to do full text search query using Entity Framework LINQ ? Or is it only supported using raw ADO.net ?

Activity

  1. Emill commented on Mar 21, 2016

    @Emill
    Contributor

    There are no support for it currently. You have to use raw ado.net. Feel free to submit a pull request if you would like to implement it :)

  2. rwasef1830 commented on Mar 21, 2016

    @rwasef1830
    ContributorAuthor

    At a minimum, I just need to be able to use the match operator and do a full text search from LINQ. I can get by with writing the index for migrations by hand.

    Any pointers on what I can subclass and replace or where to attack this problem ?

    EDIT: How can I write a class and have it recognized by LINQ to generate the correct SQL. Is there an easier way than messing with expression visitors to make something like this work ?:

    var query = ctx.MyTables
        .Where(t => PgSqlTextFunctions.Match(
          PgSqlTextFunctions.ToTsVector(t.Column1), 
          PlainToTsQuery("english","MyExpression")
        );
  3. rwasef1830 commented on Mar 22, 2016

    @rwasef1830
    ContributorAuthor

    I took a stab at implementing it myself. Hope it is good enough to get merged.

  4. added this to the 3.0.6 milestone on Apr 10, 2016
  5. changed the title [-]Entity Framework: How to do a tsquery from LINQ[/-] [+]Full-text search support for EF6[/+] on Apr 10, 2016
  6. roji commented on Apr 10, 2016

    @roji
    Member

    This is all merged and backported to 3.0.6. Have opened #1021 to track the same for EF Core.

    @rwasef1830 thanks for the awesome work. Some minor comments on contributing:

    • We try to follow standard commit message guidelines, specifically 50 chars for the first-line summary, empty line followed by 72-chars for the description.
    • Since we do gitflow we don't merge commits to master directly, only to the current hotfix branch (so hotfix/3.0.6).
    • We try to commit to develop, and then backport by doing cherry-pick -x (this leaves SHA1 of the develop commit in the 3.0.6 commit for better tracking).
  7. RobbieBerghan commented on Apr 20, 2016

    @RobbieBerghan

    Hey Roji - any time-frame when this will be released via nuget as we a really in need to full text support! Thanks - great product by the way!

  8. roji commented on Apr 20, 2016

    @roji
    Member

    3.0.6 will probably be out in another week or so, two weeks tops... and thanks for the kind words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions